消息页

This commit is contained in:
oujunhui
2020-04-03 19:21:36 +08:00
parent 8a922f39c6
commit a735fde8a2
8 changed files with 44 additions and 31 deletions

View File

@@ -62,6 +62,7 @@ import com.yizhuan.erban.decoration.view.widgets.ShowCarGuideDialog;
import com.yizhuan.erban.family.view.activity.FamilyHomeActivity;
import com.yizhuan.erban.guide.GuideActivity;
import com.yizhuan.erban.home.dialog.RecommendRoomForNewerDialog;
import com.yizhuan.erban.home.fragment.ContactsListFragment;
import com.yizhuan.erban.home.fragment.FindTabFragment;
import com.yizhuan.erban.home.fragment.GameHomeFragment;
import com.yizhuan.erban.home.fragment.MeFragment;
@@ -962,7 +963,8 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
//Fragment mainFragment = fragmentManager.findFragmentByTag(MainFragment.TAG);
Fragment attentionFragment = fragmentManager.findFragmentByTag(FindTabFragment.TAG);
Fragment msgFragment = fragmentManager.findFragmentByTag(MsgFragment.TAG);
// Fragment msgFragment = fragmentManager.findFragmentByTag(MsgFragment.TAG);
Fragment contactFragment = fragmentManager.findFragmentByTag(ContactsListFragment.TAG);
Fragment meFragment = fragmentManager.findFragmentByTag(MeFragment.TAG);
Fragment rankingFragment = fragmentManager.findFragmentByTag(RankingFragment.TAG);
Fragment gameFragment = fragmentManager.findFragmentByTag(GameHomeFragment.TAG);
@@ -973,8 +975,8 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
if (attentionFragment != null && attentionFragment.isVisible()) {
fragmentTransaction.hide(attentionFragment);
}
if (msgFragment != null && msgFragment.isVisible()) {
fragmentTransaction.hide(msgFragment);
if (contactFragment != null && contactFragment.isVisible()) {
fragmentTransaction.hide(contactFragment);
}
if (meFragment != null && meFragment.isVisible()) {
fragmentTransaction.hide(meFragment);
@@ -1009,11 +1011,11 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
}
fragmentTransaction.show(attentionFragment);
} else if (position == MainTabLayout.MAIN_TAB_POS_MSG) {
if (msgFragment == null) {
msgFragment = new MsgFragment();
fragmentTransaction.add(R.id.main_fragment, msgFragment, MsgFragment.TAG);
if (contactFragment == null) {
contactFragment = new ContactsListFragment();
fragmentTransaction.add(R.id.main_fragment, contactFragment, ContactsListFragment.TAG);
}
fragmentTransaction.show(msgFragment);
fragmentTransaction.show(contactFragment);
} else if (position == MainTabLayout.MAIN_TAB_POS_ME) {
if (meFragment == null) {
meFragment = new MeFragment();

View File

@@ -56,10 +56,10 @@ public class ContactsIndicatorAdapter extends CommonNavigatorAdapter {
public IPagerIndicator getIndicator(Context context) {
LinePagerIndicator indicator = new LinePagerIndicator(context);
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
indicator.setLineHeight(UIUtil.dip2px(mContext, 3));
indicator.setRoundRadius(UIUtil.dip2px(mContext, 2));
indicator.setLineWidth(UIUtil.dip2px(mContext, 12));
indicator.setColors(context.getResources().getColor(R.color.color_34EBDE));
indicator.setLineHeight(UIUtil.dip2px(mContext, 5));
indicator.setRoundRadius(UIUtil.dip2px(mContext, 5));
indicator.setLineWidth(UIUtil.dip2px(mContext, 9));
indicator.setColors(context.getResources().getColor(R.color.color_7154EE));
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
lp.bottomMargin = mBottomMargin;
indicator.setLayoutParams(lp);

View File

@@ -28,7 +28,7 @@ import java.util.List;
* @Date 2018/11/1
*/
public class ContactsListFragment extends BaseFragment implements ContactsIndicatorAdapter.OnItemSelectListener {
public static final String TAG = "ContactsListFragment";
private MagicIndicator indicator;
private ViewPager viewpager;
@@ -52,11 +52,13 @@ public class ContactsListFragment extends BaseFragment implements ContactsIndica
@Override
public void initiate() {
List<String> tabInfoList = new ArrayList<>();
tabInfoList.add(getString(R.string.message));
tabInfoList.add(getString(R.string.friend));
tabInfoList.add(getString(R.string.attention));
tabInfoList.add(getString(R.string.fan));
List<Fragment> mTabs = new ArrayList<>();
mTabs.add(RecentListFragment.newInstance(false));
mTabs.add(new FriendListFragment());
mTabs.add(AttentionFragment.newInstance(AbstractSelectFriendAction.TYPE_NORMAL));
mTabs.add(FansListFragment.newInstance(Constants.FAN_MAIN_PAGE_TYPE));

View File

@@ -805,7 +805,6 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
}
helper.itemView.setLayoutParams(params);
}
};
baseQuickAdapter.setOnItemClickListener((ada, view, position) -> {

View File

@@ -29,7 +29,6 @@
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
app:elevation="0dp">
@@ -47,7 +46,6 @@
android:scaleType="fitXY"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/title_bar"
android:layout_width="match_parent"
@@ -114,13 +112,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/roll_view" />
<android.support.constraint.Group
android:id="@+id/home_banner_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="recycler_view" />
app:constraint_referenced_ids="roll_view" />
</android.support.constraint.ConstraintLayout>
@@ -135,13 +134,14 @@
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:id="@+id/layout_empty"
android:onClick="@{click}"
android:focusable="true"
android:clickable="true"
android:id="@+id/layout_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView

View File

@@ -272,7 +272,7 @@
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="4"
android:weightSum="5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_avatar_head_wear"
@@ -306,17 +306,13 @@
</LinearLayout>
<!-- <View-->
<!-- android:layout_width="1dp"-->
<!-- android:layout_height="13dp"-->
<!-- android:background="#E6E6E6" />-->
<LinearLayout
android:id="@+id/tv_user_fans"
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:gravity="center"
android:onClick="@{click}"
android:orientation="vertical">
@@ -342,10 +338,20 @@
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="@dimen/dp_30"
android:background="#E6E6E6" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
>
<View
android:layout_width="1dp"
android:layout_height="@dimen/dp_30"
android:background="#30FFFFFF" />
</LinearLayout>
<LinearLayout
@@ -353,7 +359,7 @@
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:gravity="center"
android:onClick="@{click}"
android:orientation="vertical">
@@ -364,6 +370,7 @@
android:drawableTop="@mipmap/icon_my_room"
android:textColor="@color/color_CEC0FF"
android:drawablePadding="@dimen/dp_3"
android:textSize="@dimen/sp_11"
/>
</LinearLayout>
@@ -383,6 +390,7 @@
android:text="@string/collect_room"
android:drawablePadding="@dimen/dp_3"
android:textColor="@color/color_CEC0FF"
android:textSize="@dimen/sp_11"
/>
</LinearLayout>

View File

@@ -256,7 +256,7 @@
<color name="bubbleView_dark_press_background">#E6000000</color>
<color name="color_7154EE">#7154EE</color>
<color name="color_333333">#333333</color>
<color name="color_666666">#666666</color>
<color name="color_ffc160">#ffc160</color>
@@ -487,6 +487,8 @@
<color name="color_9af5ef">#9af5ef</color>
<!-- 66陪玩主题色 -->
<color name="color_7154EE">#7154EE</color>
<color name="color_34EBDE">#34EBDE</color>
<color name="color_39EBDF">#39EBDF</color>