|
|
@@ -7,10 +7,13 @@ import android.support.design.widget.TabLayout;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
+import android.widget.LinearLayout;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
+import kr.co.zumo.app.lifeplus.helper.NavigationBar;
|
|
|
import kr.co.zumo.app.lifeplus.model.BlankModel;
|
|
|
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.SwipeNoneViewPager;
|
|
|
@@ -32,6 +35,7 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
|
|
|
private SwipeNoneViewPager viewPagerIntroduction;
|
|
|
private LifeplusIntroductionPagerAdapter pagerAdapter;
|
|
|
private IEventListener listener;
|
|
|
+ private LinearLayout layoutNavigationContainer;
|
|
|
|
|
|
private static final String APP_GUIDE = "App 이용가이드";
|
|
|
private static final String LIFE_PLUS_BRAND = "Lifeplus 브랜드";
|
|
|
@@ -44,11 +48,27 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
|
|
|
|
|
|
@Override
|
|
|
protected void onAfterActivityCreated(Bundle savedInstanceState) {
|
|
|
- tabLayoutIntroduction = findViewById(R.id.life_plus_tab_layout);
|
|
|
- tabLayoutIntroduction.setTabGravity(TabLayout.GRAVITY_FILL);
|
|
|
+
|
|
|
+ findViewById(R.id.main_content).setPadding(0, ResourceUtil.getStatusBarHeightManual(), 0, 0);
|
|
|
+
|
|
|
viewPagerIntroduction = findViewById(R.id.life_plus_view_pager);
|
|
|
viewPagerIntroduction.setPagingEnabled(false);
|
|
|
|
|
|
+ layoutNavigationContainer = findViewById(R.id.layout_navigation_bar);
|
|
|
+ layoutNavigationContainer.addView(
|
|
|
+ new NavigationBar.Builder(getContext())
|
|
|
+ .title(R.string.life_plus_guide)
|
|
|
+ .menu(actionBar -> presenter.onNavigationClickMenu(actionBar))
|
|
|
+ .search(actionBar -> presenter.onNavigationClickSearch(actionBar))
|
|
|
+ .back(actionBar -> presenter.onNavigationClickBack(actionBar))
|
|
|
+ .build()
|
|
|
+ .getView()
|
|
|
+
|
|
|
+ );
|
|
|
+
|
|
|
+ tabLayoutIntroduction = findViewById(R.id.life_plus_tab_layout);
|
|
|
+ tabLayoutIntroduction.setTabGravity(TabLayout.GRAVITY_FILL);
|
|
|
+ tabLayoutIntroduction.setupWithViewPager(viewPagerIntroduction, true);
|
|
|
|
|
|
String[] tabs = {APP_GUIDE, LIFE_PLUS_BRAND};
|
|
|
pagerAdapter = new LifeplusIntroductionPagerAdapter(getChildFragmentManager(), new IEventListener() {
|
|
|
@@ -57,9 +77,10 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
|
|
|
presenter.onEvent(event);
|
|
|
}
|
|
|
}, tabs);
|
|
|
- tabLayoutIntroduction.setupWithViewPager(viewPagerIntroduction, true);
|
|
|
+
|
|
|
viewPagerIntroduction.setAdapter(pagerAdapter);
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -68,7 +89,8 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
|
|
|
.menu(actionBar -> presenter.onNavigationClickMenu(actionBar))
|
|
|
.search(actionBar -> presenter.onNavigationClickSearch(actionBar))
|
|
|
.back(actionBar -> presenter.onNavigationClickBack(actionBar))
|
|
|
- .show();
|
|
|
+ .scroll()
|
|
|
+ .hide();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -90,4 +112,21 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
|
|
|
protected boolean isSkipScreenWhenBack() {
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+// private void drawTabLayout() {
|
|
|
+// LayoutInflater layoutInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
+// View container = layoutInflater.inflate(R.layout.activity_main, null);
|
|
|
+// View tabView = layoutInflater.inflate(R.layout.life_plus_introduction_tab_layout, null);
|
|
|
+// ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
|
+// if (null != tabView) {
|
|
|
+// Log.e("APP# LifeplusIntroductionFragment | drawTabLayout", "|" + "tab view is not null");
|
|
|
+// coordinatorLayout.addView(tabView, params);
|
|
|
+// tabLayoutIntroduction = tabView.findViewById(R.id.life_plus_tab_layout);
|
|
|
+// tabLayoutIntroduction.setTabGravity(TabLayout.GRAVITY_FILL);
|
|
|
+// tabLayoutIntroduction.setupWithViewPager(viewPagerIntroduction, true);
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
}
|
|
|
+
|