Skip to main content

Posts

Showing posts with the label row

Delete A row in ListView with Animation

Listview is simply a group of view that displays a list of scrolling items. "Adapters" are used to insert list items to the list.By default we are able to provide only text as list items.In order to delete a row from listview, copy or download this javacode and try yourself. Also see here : Android – Bullets in ListView ListView in Alphabetic Order in ANDROID Single Selection ListView in android Simple ListView in Android java file : public class SimpleListViewActivity extends Activity { private ListView mainListView; private ArrayAdapter<String> listAdapter; ArrayList<String> all_rowtext = new ArrayList<String>() ; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Find the ListView resource. mainListView = (ListView) findViewById(R.id.mainListView); all_rowtext.add("Angel"); all_rowtext.add("Mark"); all_rowtext.add("Coding...

How to use RadioButtonGroup in Android?

in xml page: < ?xml version="1.0" encoding="utf-8"?> < LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > < TextView android:id="@+id/tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Which company do you like the most?" android:textSize="25dp" android:textStyle="bold" /> < RadioGroup android:id="@+id/menu" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checkedButton="@+id/lunch" android:orientation="vertical" > < RadioButton android:id="@+id/google" ...

Creating A Customized ListView in Android

Listview is simply a group of view that displays a list of scrolling items. "Adapters" are used to insert list items to the list.By default we are able to provide only text as list items.In order to insert other attributes make a customized listview. Copy or download this javacode and try yourself. Also see here : Android – Bullets in ListView ListView in Alphabetic Order in ANDROID Single Selection ListView in android Simple ListView in Android java file : public class CustomListView extends Activity { static final String[] items = new String[]{"Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday",""Saturday"}; ListView listview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); listview=(ListView) findViewByI...