|
|
@@ -1,4 +1,4 @@
|
|
|
-package com.guiying.module.main;
|
|
|
+package com.uas.module.main;
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
|
@@ -6,22 +6,16 @@ import android.support.annotation.Nullable;
|
|
|
import android.support.design.widget.BottomNavigationView;
|
|
|
import android.view.MenuItem;
|
|
|
|
|
|
-import com.guiying.module.common.base.BaseActivity;
|
|
|
-import com.guiying.module.common.base.BaseFragment;
|
|
|
-import com.guiying.module.common.base.ClassUtils;
|
|
|
-import com.guiying.module.common.base.IViewDelegate;
|
|
|
-import com.guiying.module.common.base.ViewManager;
|
|
|
-import com.guiying.module.common.widget.NoScrollViewPager;
|
|
|
+import com.uas.module.common.base.BaseActivity;
|
|
|
+import com.uas.module.common.base.BaseFragment;
|
|
|
+import com.uas.module.common.base.ClassUtils;
|
|
|
+import com.uas.module.common.base.IViewDelegate;
|
|
|
+import com.uas.module.common.base.ViewManager;
|
|
|
+import com.uas.module.common.widget.NoScrollViewPager;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
-/**
|
|
|
- * <p> </p>
|
|
|
- *
|
|
|
- * @author 张华洋 2017/9/27 10:23
|
|
|
- * @version V1.1
|
|
|
- * @name BottomNavigationActivity
|
|
|
- */
|
|
|
+
|
|
|
public class BottomNavigationActivity extends BaseActivity {
|
|
|
|
|
|
private NoScrollViewPager mPager;
|
|
|
@@ -61,7 +55,7 @@ public class BottomNavigationActivity extends BaseActivity {
|
|
|
private void initViewPager() {
|
|
|
mFragments = ViewManager.getInstance().getAllFragment();//这几个Fragment是主动添加到ViewManager中的
|
|
|
BaseFragment newsFragment = getNewsFragment();//主动寻找
|
|
|
- mFragments.add(newsFragment);
|
|
|
+// mFragments.add(newsFragment);
|
|
|
mPager = (NoScrollViewPager) findViewById(R.id.container_pager);
|
|
|
mAdapter = new FragmentAdapter(getSupportFragmentManager(), mFragments);
|
|
|
mPager.setPagerEnabled(false);
|
|
|
@@ -76,7 +70,7 @@ public class BottomNavigationActivity extends BaseActivity {
|
|
|
*/
|
|
|
private BaseFragment getNewsFragment() {
|
|
|
BaseFragment newsFragment = null;
|
|
|
- List<IViewDelegate> viewDelegates = ClassUtils.getObjectsWithInterface(this, IViewDelegate.class, "com.guiying.module.news");
|
|
|
+ List<IViewDelegate> viewDelegates = ClassUtils.getObjectsWithInterface(this, IViewDelegate.class, "com.uas.module.news");
|
|
|
if (viewDelegates != null && !viewDelegates.isEmpty()) {
|
|
|
newsFragment = viewDelegates.get(0).getFragment("");
|
|
|
}
|