Skip to main content

Posts

Showing posts from July, 2016

Android button customization

<? xml version = "1.0" encoding = "utf-8" ?> <ripple xmlns:android = "http://schemas.android.com/apk/res/android" android:color = "#DDDDDD" > <item> <selector> <item android:state_selected = "true" > <color android:color = "#EEEEEE" /> </item> <item android:state_activated = "true" > <color android:color = "#EEEEEE" /> </item> <item> <color android:color = "#FFFFFF" /> </item> </selector> </item> </ripple> or add this to make a shape <item> <shape android :shape= "rectangle" > <corners android :radius= "50dp" /> <solid android :color= "#4444ff" /> </shape> </item...

Android list view

http://www.mkyong.com/android/android-listview-example/ TextView textView = ( TextView ) rowView .findViewById(R.id. label ) ; ListView listView = ( ListView ) view .findViewById(R.id. mainListView ) ; Can not resolve method findViewById(int) ** this will different from the view that included (R.layout.layoutXML) -no need view. for setContentView -used for inflater ListView listView = (ListView)view.findViewById(R.id. mainListView ) ; ContactListArrayAdapter adapter = new ContactListArrayAdapter(getContext() , MOBILE_OS ) ; listView.setAdapter(adapter) ; Get list view that in the different layout file and set array adapter.