How to make a "Settings" list view

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

How to make a "Settings" list view

Postby puxdroid » Mon Dec 07, 2009 5:37 pm

Hello.
I am trying to make a ListView like Android phone "Settings", but I don't know how to do that.

I have this code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package org.servDoid.web;
  2.  
  3. import android.app.ListActivity;
  4. import android.os.Bundle;
  5. import android.widget.ArrayAdapter;
  6.  
  7. public class SettingsInterface extends ListActivity {
  8.  
  9.         static final String[] LIST = new String[] { "Port", "Max Clients",
  10.                         "Black List", "White list", "Password", "WWW path", "Error page",
  11.                         "Cookies" };
  12.  
  13.         @Override
  14.         public void onCreate(Bundle savedInstanceState) {
  15.                 super.onCreate(savedInstanceState);
  16.  
  17.                 setListAdapter(new ArrayAdapter<String>(this,
  18.                                 android.R.layout.simple_list_item_1, LIST));
  19.                 getListView().setTextFilterEnabled(true);
  20.         }
  21.  
  22. }
  23.  
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


But it is not enough, because I want to put some text under key "Port", "Max clients", etc. and maybe some image like this:

Image

Can anybody help me?

Thanks in advance and sorry for my English.
puxdroid
Developer
Developer
 
Posts: 49
Joined: Wed Nov 25, 2009 11:57 am

Top

Re: How to make a "Settings" list view

Postby jagtap.jj1 » Tue Dec 08, 2009 6:46 am

Setting app is open source go through it http://android.git.kernel.org/?p=platfo ... ;a=summary
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby Droid123 » Tue Dec 08, 2009 10:58 pm

I don't have access to the git repository / don't know how to read it. Could you copy the code for this particular ListView and paste it here?
Droid123
Experienced Developer
Experienced Developer
 
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm

Postby jagtap.jj1 » Wed Dec 09, 2009 4:23 am

You must be its public repository, try this http://android.git.kernel.org/?p=platfo ... 153d717bc3
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby puxdroid » Wed Dec 09, 2009 12:27 pm

Are there any tutorial to make a "Settings" menu?
puxdroid
Developer
Developer
 
Posts: 49
Joined: Wed Nov 25, 2009 11:57 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests