Quick simple Q...

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

Quick simple Q...

Postby Draffodx » Tue Dec 22, 2009 3:54 pm

can anyone tell me the simplest way to create a layout like this?

Without using a preference screen

Image
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Top

Postby achie1266 » Tue Dec 22, 2009 5:51 pm

A linear layout may be the best one if the data is fixed or only the text changes.
Use textviews within and use drawable rectangles or use custom images for the dividers.
achie
User avatar
achie1266
Master Developer
Master Developer
 
Posts: 223
Joined: Mon Nov 09, 2009 10:56 pm
Location: Denver

Postby Droid123 » Wed Dec 23, 2009 12:23 am

ListActivity..
Droid123
Experienced Developer
Experienced Developer
 
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm

Postby achie1266 » Wed Dec 23, 2009 12:29 am

yes a ListActivity is normally the best for a list but here he seems to be requiring different layouts.
So It will be required to create different layouts for each item that needs a different kind of layout.
Even then ListActivity will be good if it is more than 10 items.

But if its only 5 or 6 items as shown in the picture then Just a simple LinearLayout might be better for better customization.
achie
User avatar
achie1266
Master Developer
Master Developer
 
Posts: 223
Joined: Mon Nov 09, 2009 10:56 pm
Location: Denver

Postby Droid123 » Wed Dec 23, 2009 12:36 am

I guess you could do that, and specify each specific layout in XML and then inflate + LinearLayout.addView().

What are you trying to accomplish in this scenario I wonder?
Droid123
Experienced Developer
Experienced Developer
 
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm

Postby Draffodx » Wed Dec 23, 2009 10:37 am

I want to create a list of options that the user can click on and then edit there settings.

The settings will be coming from a content provider.

I have attached a pic of what I have at the minute, I'd like it to look like what I posted in my opening post but with the setting name like Voip Userame over an editable box that the user can click into and change there settings


[img]http://www.anddev.org/files/tabview_177.jpg[/img]
Attachments
tabView.JPG
tabview
tabView.JPG (28.08 KiB) Viewed 226 times
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Top

Postby Droid123 » Wed Dec 23, 2009 12:04 pm

If it's going to act as a preference screen why not use PreferenceActivity?
Droid123
Experienced Developer
Experienced Developer
 
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm

Postby Draffodx » Wed Dec 23, 2009 1:09 pm

Droid123 wrote:If it's going to act as a preference screen why not use PreferenceActivity?


Because I'm not using preferences for the settings, the data for the settings will be coming from a database via a content provider.
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Postby achie1266 » Wed Dec 23, 2009 5:39 pm

Sorry Draffodx,
Looks like I did not understand your problem.
Are you saying that you have a list and when the user clicks any item you have to open the respective settings screen?
If that is so why not create the settings window in a normal linearLayout and put your TextViews and EditTexts in that and show this when the user clicks on the respective listItem.

again I am sorry if i did not get you right. The two images that you posted gave me an impression that you are trying to do what I thought.
achie
User avatar
achie1266
Master Developer
Master Developer
 
Posts: 223
Joined: Mon Nov 09, 2009 10:56 pm
Location: Denver

Postby Draffodx » Mon Jan 04, 2010 10:12 am

Hi achie1266,

Thanks again for your reply, I think thats the way I will do it but what I wanted really is the textview and Edit texts in a list type view where a user can click and edit the settings from the list, so they'd have a list of all settings, click on one and then be able to edit it
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Postby Draffodx » Wed Jan 06, 2010 12:26 pm

This is what I have now which is pretty much exactly the basic layout that I want.

But since I'm not from a design or User interface background can anyone suggest anything to brigthen it up a bit?

How would I go about drawing box's around each option kind of like borders?
Attachments
settings.JPG
Settings
settings.JPG (39.13 KiB) Viewed 169 times
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests