android-fragments

Viewpager tabs recreated?

会有一股神秘感。 提交于 2020-02-23 03:53:10
问题 I have implemented a NavigationDrawer with a few items in it. Every item represents a different Fragment and one of them has tabs. My problem is that every time I open this Fragment the tabs reloaded! and added to the previous tabs. Why is this happening and how can I solve it? This is the Fragment with the tabs: public class fragment_profilo_tabs extends Fragment implements ActionBar.TabListener { private ViewPager viewPager; private TabsPagerAdapter mAdapter; private ActionBar actionBar; //

CoordinatorLayout doesn't hide the actionbar

萝らか妹 提交于 2020-02-22 09:50:48
问题 This is driving me nuts. I have been trying to make this work for two days, and no progress has been made. I want to have an app bar that hides when I scroll the ViewPager down, and shows when I scroll ViewPager up, and this appears to be the standard way of doing it. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas

CoordinatorLayout doesn't hide the actionbar

左心房为你撑大大i 提交于 2020-02-22 09:43:23
问题 This is driving me nuts. I have been trying to make this work for two days, and no progress has been made. I want to have an app bar that hides when I scroll the ViewPager down, and shows when I scroll ViewPager up, and this appears to be the standard way of doing it. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas

CoordinatorLayout doesn't hide the actionbar

假如想象 提交于 2020-02-22 09:42:18
问题 This is driving me nuts. I have been trying to make this work for two days, and no progress has been made. I want to have an app bar that hides when I scroll the ViewPager down, and shows when I scroll ViewPager up, and this appears to be the standard way of doing it. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas

CoordinatorLayout doesn't hide the actionbar

家住魔仙堡 提交于 2020-02-22 09:40:30
问题 This is driving me nuts. I have been trying to make this work for two days, and no progress has been made. I want to have an app bar that hides when I scroll the ViewPager down, and shows when I scroll ViewPager up, and this appears to be the standard way of doing it. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas

CoordinatorLayout doesn't hide the actionbar

依然范特西╮ 提交于 2020-02-22 09:40:11
问题 This is driving me nuts. I have been trying to make this work for two days, and no progress has been made. I want to have an app bar that hides when I scroll the ViewPager down, and shows when I scroll ViewPager up, and this appears to be the standard way of doing it. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas

How to handle orientation change using fragment?

心不动则不痛 提交于 2020-02-21 13:18:45
问题 I now have 2 fragment, one fragment handle portrait mode then another handle landscape mode. But the problem is that when rotate from portrait to landscape then back to portrait. It will not show the same thing that show on the first portrait mode. Is there any code that can solve this problem? This code is inside the fragment holder: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.frag_holder); FragmentManager fm =

ScrollView Inside ViewPager Not Working

独自空忆成欢 提交于 2020-02-20 11:42:10
问题 i have an activity ViewPager and which have Tabbed Childs. The childs with recycler View do Scroll. Although When i create a simple fragment with scroll view it does not work. here is the main activity fragment - <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"

How to update fragment in Swipe View with Tabs

时间秒杀一切 提交于 2020-02-15 12:33:06
问题 the following: I'm using Swipe View with Tabs. Works quite smooth so far. The thing is: I have two fragments/tabs. Each contains a ListView . I can remove an item from the left list. When I swipe to the right I want to update the list adapter so the left-deleted item is shown. I tried onSwipeListerner , TabListener , onPageChangeListener (and on Resume() in the fragment itself). Nothing worked... Either the function is not called or I don't get the fragment object. Does anybody know how I can

mActivity from Fragment.onAttach() not retained

风格不统一 提交于 2020-02-08 09:10:37
问题 I have setup a Observable/Subscriber with RxJava. The Observable is created in MainActivity. The Subscriber is a android.support.v4.app.Fragment called MyFragment. The Observable gets data from RESTful service and stores the data in a SQLite db on the device. This works. When its work is done, which takes 4 or 5 seconds such that MyFragment has already processed onCreate() , onCreateView() etc., the subscriber, MyFragment, is notified via its implemented onNext() method (this works) and is