Re: [android-developers] How to Set 2 EmptyView in ListView

2011-05-01 Thread smokerpg
thank you for advice. i can show 3 views by using LinearLayout. LinearLayout android:layout_width=wrap_content android:layout_height=fill_parent android:id=@+id/empty ImageView android:id=@+id/emptyImage android:src=@drawable/img

Re: [android-developers] How to Set 2 EmptyView in ListView

2011-05-01 Thread Dianne Hackborn
I would really suggest just defining your layout in a layout XML resource file and using that. It is a lot easier than writing the code to build the view hierarchy yourself. Use LayoutInflator to create the views from the layout resource. On Sun, May 1, 2011 at 10:00 PM, smokerpg

Re: [android-developers] How to Set 2 EmptyView in ListView

2011-05-01 Thread smokerpg
i write empty views to layout.xml. id, layout width, height, src, text. sometime i write the code to build views, layout_params etc... , and its hard to maintain. i think i have to change style of making views to create views.xml. 2011/5/2 Dianne Hackborn hack...@android.com: I would

[android-developers] How to Set 2 EmptyView in ListView

2011-04-28 Thread kenichi kato
hi guys. i try to set 3 empty view to ListView. at first, i try to set LinearLayout to EmptyView. but it doesn't work. so, i try this code. listView.setEmptyView(findViewById(R.id.emptyImage)); listView.setEmptyView(findViewById(R.id.emptyButton));

Re: [android-developers] How to Set 2 EmptyView in ListView

2011-04-28 Thread Dianne Hackborn
No. There is only one empty view. If you want an empty view with multiple things in it, use a layout manager and put your views inside and set the top-level layout manager as the empty view. On Wed, Apr 27, 2011 at 11:15 PM, kenichi kato smokerpg...@gmail.comwrote: hi guys. i try to set 3

Re: [android-developers] How to Set 2 EmptyView in ListView

2011-04-28 Thread Dianne Hackborn
Btw you can pretty uniformly take a function that starts with set on Android to mean replace whatever you previously had with the new value being supplied. On Thu, Apr 28, 2011 at 8:39 AM, Dianne Hackborn hack...@android.comwrote: No. There is only one empty view. If you want an empty view