Edit text focus and list divider style

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Edit text focus and list divider style

Postby rkarthik » Tue Feb 24, 2009 3:50 pm

How do i create a list divider like the default one whose size is less at the edges and which is faded. Currently im using a gradient drawable..Please help me as to how i should go about doing this..

GradientDrawable gD = new GradientDrawable();
gD.setColor(Color.LTGRAY);
listView.setDivider(gD);

Also i need to know how to remove the focus from a edit text, whenever i open an activity the cursor is always on the edit text by default, how do i remove this?
rkarthik
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Jan 14, 2009 11:40 am

Top

Postby rkarthik » Thu Feb 26, 2009 12:49 pm

Can somebody please help ne out with these two issues please..
rkarthik
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Jan 14, 2009 11:40 am

Postby michael_g_hu » Fri Feb 27, 2009 8:29 am

firstly, if you want to move the focus off from the edittext, you must include another focusable widget in the layout.
about the GradientDrawable, you should read the doc carefully, there is a way to create a faded one
michael_g_hu
Developer
Developer
 
Posts: 35
Joined: Fri Mar 21, 2008 9:46 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests