[android-developers] Re: how to make each item in ListView has different layout ?

2009-05-21 Thread quanghuytruongd...@gmail.com
Ooops, and of course: projectList.setAdapter(new CustomListAdapter (YourActivity.this)); On May 22, 11:36 am, stonestrange wrote: > hi, > I am trying to have a list in my app. In the list,there are two > columns,the first is DbAdapter.KEY_ID,and the second is > DbAdapter.KEY_PROJECT. That is ev

[android-developers] Re: how to make each item in ListView has different layout ?

2009-05-21 Thread quanghuytruongd...@gmail.com
Create a new class (can be named for ex CustomListAdapter) that extends BaseAdapter, and do your customized in "public View getView (int position, View convertView, ViewGroup parent)". Ex: @Override public View getView(int position, View convertView, ViewGroup parent) { Tex

[android-developers] Re: Set the theme from the application: the background doesn't change

2009-05-21 Thread quanghuytruongd...@gmail.com
ed and rebuilt from its resources. > > On Thu, May 21, 2009 at 6:01 PM, quanghuytruongd...@gmail.com < > > > > quanghuytruongd...@gmail.com> wrote: > > > You can try to put setTheme() before super.onCreate() --> your > > background will change. > > > I

[android-developers] Re: Set the theme from the application: the background doesn't change

2009-05-21 Thread quanghuytruongd...@gmail.com
the text color by pressing a button. On May 21, 2:53 pm, "quanghuytruongd...@gmail.com" wrote: > Hi all, > > I am trying to change my application theme from java code (For ex: > press a button, and the whole application will apply a new Theme: new > background, new text

[android-developers] Set the theme from the application: the background doesn't change

2009-05-21 Thread quanghuytruongd...@gmail.com
Hi all, I am trying to change my application theme from java code (For ex: press a button, and the whole application will apply a new Theme: new background, new text color). But I don't know why setTheme(myCustomTheme) only apply my android:textColor item, it doesn't apply the item android:windo