android-listfragment

setEmptyView() doesn't seem to work for (Sherlock)ListFragment

前提是你 提交于 2019-12-23 22:27:52
问题 I have a ListFragment and I want to set its empty view, so I use the following code: View emptyView = getLayoutInflater().inflate(R.layout.collection_empty_view, null); detailFragment.getListView().setEmptyView(emptyView); for the following xml layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/empty" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <TextView

implements OnScrollListener inside listFragment

此生再无相见时 提交于 2019-12-23 19:23:07
问题 I implemented OnScrollListener interface in ListFragment, and i want to change text when last element of list is visible but it doesn't work. I didn't find example of similar problem(OnScrollListener inside ListFragment). My example: public class MyListFragment1 extends ListFragment implements OnScrollListener { public View view; public class MyListAdapter extends ArrayAdapter<String> { Context myContext; List<String> lista; public MyListAdapter(Context context, int textViewResourceId, List

Change font of list fragment on Detail fragment

风格不统一 提交于 2019-12-22 08:24:45
问题 I am trying to implement fragment using android 4.0. I have added the three items in list fragment in my DummyContent.java file static { // Add 3 sample items. addItem(new DummyItem("1", "Videos")); addItem(new DummyItem("2", "Images")); addItem(new DummyItem("3", "Story")); } These Videos,Images,Story are appearing on left side of fragment on click of each it item shows details information on detail fragment in right hand side. I want to change the font of these list views but problem is

ListView shows empty message briefly before data is loaded

江枫思渺然 提交于 2019-12-22 04:07:34
问题 I've created a ListFragment using the following custom layout which adds a TextView to show a message when the list is empty: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ListView android:id="@id/android:list" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android

ListView shows empty message briefly before data is loaded

六眼飞鱼酱① 提交于 2019-12-22 04:07:12
问题 I've created a ListFragment using the following custom layout which adds a TextView to show a message when the list is empty: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ListView android:id="@id/android:list" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android

Android, How to mix ActionBar.Tab + View Pager + ListFragment

ぐ巨炮叔叔 提交于 2019-12-21 05:27:06
问题 I've been trying to test how to mix all these things together and I'm having problems!! I just want an app with three tabs using the ActionBar.Tab. For example, this tabs can be movies genres Action, Adventure and Animation, the user can swipe through the tabs, so it will use the ViewPager and each tab will show a list of movies of that genre. There's no need to have three different fragments classes because all tabs will be the same format a simple list. And I'm having problems because when

Custom ArrayAdapter in a ListFragment

两盒软妹~` 提交于 2019-12-20 10:04:12
问题 I'm trying to create a custom ArrayAdapter to use for my ListFragment . Right now nothing is being displayed in the ListFragment except for the TextView saying what Fragment number it is. I have put a breakpoint in getView() method of my adapter and it is not being called. I searched for reasons that wouldn't be called and some people seem to think that my ListView is hidden, so I've tried changing the layout_height to wrap_content , but that didn't work. Also, I've been following the code

listfragment overlapping my main drawer

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 06:32:52
问题 im new in android im creating an app and i have a problem with a listfragment, because the list its showing but its overlapping the title bar(i had to add margin top to change that), and also im using a drawer and when im trying to open the list it shows over the options drawer too, letme paste you the code and the image so you can understan more: The xml code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation=

ListFragment Not Rendering and getView() in Adapter Not Being Called

馋奶兔 提交于 2019-12-20 04:55:11
问题 From what I can gather it appears that this might be because my ListView is not being displayed, I've verified that getCount is returning a value not zero, but I can't see what I'm doing wrong. Everything loads and acts like it's working but the ListView never appears, I put a background color on the fragment reference in mixed.xml and it is there and taking up the full screen, but when I set a background color on my ListView it does not appear, it's like it's not being rendered at all. More

android Illegal state exception content view not yet create?

。_饼干妹妹 提交于 2019-12-20 04:23:42
问题 Hi when I start my drawer activity fragment, the illegal state exception content view not yet create error pop up. here is my code and error. I am using an custom list adapter. error: 10-14 09:40:25.926: E/AndroidRuntime(6736): java.lang.IllegalStateException: Content view not yet created 10-14 09:40:25.926: E/AndroidRuntime(6736): at android.app.ListFragment.ensureList(ListFragment.java:386) 10-14 09:40:25.926: E/AndroidRuntime(6736): at android.app.ListFragment.getListView(ListFragment.java