Android dev logo

Android – create EditText programatically

Problem: How to create EditText programatically? Solution: [sourecode language="java"] EditText ed = new EditText(this); // Type of input that you want from user to input i.e. number, text ed.setInputType(InputType.TYPE_CLASS_TEXT); //…
Android dev logo

Android – Bullets in ListView

Problem: How to show bullets in ListView/TextView in Android?
Description: 

There is no easy way to show indentation in ListView/TextView, so here i made a trick and define a drawable to display Bullet at left side of each item of the ListView. And i have defined a custom listview row file and used the same drawable file using android:drawableLeft=”@drawable/bullet”.