Category: Android Studio

6

android studio datepickerdialog, json parser dan listview

activity : <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”a.setya.me.pointer.TopMember”> <ListView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/top_member” android:choiceMode=”singleChoice” android:longClickable=”false” android:smoothScrollbar=”true” style=”@style/TextAppearance.AppCompat.Caption” android:background=”@color/background_floating_material_dark” android:layout_alignParentRight=”true” android:layout_alignParentEnd=”true” android:layout_below=”@+id/btn_tm_showdata” /> <EditText android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:inputType=”date” android:ems=”10″ android:id=”@+id/tm_dateedit”...

0

android studio asynctask HttpUrlConnection get

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new DownloadTask().execute(“http://url”); } private class DownloadTask extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String… params) { //do your request in here so that you don’t...

0

android studio menu action bar

xml menu : <menu xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” tools:context=”.MainActivity”> <item android:id=”@+id/action_refresh” android:title=”Refresh” android:orderInCategory=”100″ app:showAsAction=”always” android:icon=”@android:drawable/stat_notify_sync_noanim”/> <item android:id=”@+id/action_bydate” android:title=”Search” android:orderInCategory=”100″ app:showAsAction=”ifRoom” android:icon=”@android:drawable/ic_menu_today”/> <item android:id=”@+id/action_topten” android:title=”Top 10 Member” android:orderInCategory=”100″ app:showAsAction=”never” android:icon=”@android:drawable/ic_menu_myplaces”/> <item android:id=”@+id/action_active” android:title=”Clock” android:orderInCategory=”100″ app:showAsAction=”never” android:icon=”@android:drawable/stat_notify_sync_noanim”/>...