广场部分修改

This commit is contained in:
oujunhui
2020-04-08 10:39:44 +08:00
parent 4f39810623
commit 65644508b9
8 changed files with 70 additions and 21 deletions

View File

@@ -58,6 +58,7 @@ import com.yizhuan.erban.community.dynamic.view.DynamicDetailActivity;
import com.yizhuan.erban.community.holder.DynamicSysHolder;
import com.yizhuan.erban.community.im.WorldDynamicShareViewHolder;
import com.yizhuan.erban.community.publish.view.PublishActivity;
import com.yizhuan.erban.community.square.SquareFragment;
import com.yizhuan.erban.decoration.view.widgets.ShowCarGuideDialog;
import com.yizhuan.erban.family.view.activity.FamilyHomeActivity;
import com.yizhuan.erban.guide.GuideActivity;
@@ -968,7 +969,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
//Fragment mainFragment = fragmentManager.findFragmentByTag(MainFragment.TAG);
Fragment attentionFragment = fragmentManager.findFragmentByTag(FindTabFragment.TAG);
Fragment attentionFragment = fragmentManager.findFragmentByTag(SquareFragment.TAG);
// Fragment msgFragment = fragmentManager.findFragmentByTag(MsgFragment.TAG);
Fragment contactFragment = fragmentManager.findFragmentByTag(ContactsListFragment.TAG);
Fragment meFragment = fragmentManager.findFragmentByTag(MeFragment.TAG);
@@ -1012,8 +1013,8 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
// fragmentTransaction.show(mainFragment);
} else if (position == MainTabLayout.MAIN_TAB_POS_ATTENTION) {
if (attentionFragment == null) {
attentionFragment = new FindTabFragment();
fragmentTransaction.add(R.id.main_fragment, attentionFragment, FindTabFragment.TAG);
attentionFragment = new SquareFragment();
fragmentTransaction.add(R.id.main_fragment, attentionFragment, SquareFragment.TAG);
}
fragmentTransaction.show(attentionFragment);
} else if (position == MainTabLayout.MAIN_TAB_POS_MSG) {

View File

@@ -213,6 +213,11 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
case R.id.layout_empty:
getHomeBannerInfo();
break;
//首页榜单
case R.id.tv_ranking:
CommonWebViewActivity.start(mContext, "http://apibeta.qxjiaoyou.com/modules/erbanRank/index.html");
break;
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#40FFFFFF" />
<corners android:topLeftRadius="@dimen/dp_20"
android:bottomLeftRadius="20dp"
android:radius="@dimen/dp_5"
android:bottomRightRadius="@dimen/dp_15"/>
</shape>

View File

@@ -141,20 +141,38 @@
<TextView
android:id="@+id/tv_search_room"
android:layout_width="0dp"
android:layout_height="@dimen/dp_32"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_20"
android:layout_weight="1"
android:background="@drawable/shape_white_20dp_round"
android:layout_gravity="center_vertical"
android:layout_height="@dimen/dp_32"
android:layout_marginStart="@dimen/dp_20"
android:onClick="@{click}"
android:text="@string/search_hint"
android:drawableStart="@mipmap/ic_home_search"
android:drawablePadding="@dimen/dp_7"
android:gravity="center_vertical"
android:textSize="@dimen/sp_13"
android:textColor="@color/white"
android:onClick="@{click}"
android:paddingStart="@dimen/dp_11"
android:paddingEnd="5dp"
android:drawablePadding="@dimen/dp_7"
android:drawableStart="@mipmap/ic_home_search" />
android:text="@string/search_hint"
android:textColor="@color/white"
android:textSize="@dimen/sp_13" />
<TextView
android:id="@+id/tv_ranking"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_32"
android:text="@string/ranking"
android:background="@drawable/shape_white_ranking_round"
android:drawableStart="@mipmap/ic_home_ranking"
android:textSize="@dimen/sp_13"
android:textColor="@color/white"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginStart="@dimen/dp_13"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:onClick="@{click}"
/>
<ImageView
android:id="@+id/iv_to_sign_in"
@@ -164,6 +182,7 @@
android:layout_marginStart="@dimen/dp_11"
android:gravity="center"
android:onClick="@{click}"
android:visibility="gone"
android:scaleType="centerInside"
android:src="@drawable/icon_to_sign_in" />
@@ -175,7 +194,7 @@
android:onClick="@{click}"
android:layout_marginEnd="@dimen/dp_10"
android:scaleType="centerInside"
android:visibility="@{open_visible ? View.VISIBLE : View.GONE}"
android:visibility="gone"
android:src="@mipmap/ic_open_room" />
</LinearLayout>
</FrameLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

View File

@@ -867,6 +867,7 @@
<string name="my_room">我的房间</string>
<string name="collect_room">收藏房间</string>
<string name="ranking">榜单</string>
</resources>

View File

@@ -14,10 +14,14 @@ import com.yizhuan.erban.avroom.adapter.RoomContributeListAdapter;
import com.yizhuan.erban.base.BaseFragment;
import com.yizhuan.erban.common.widget.DragLayout;
import com.yizhuan.erban.community.publish.view.PublishActivity;
import com.yizhuan.erban.home.adapter.TopMagicIndicatorAdapter;
import com.yizhuan.erban.home.fragment.FindTabFragment;
import com.yizhuan.erban.home.view.IFindTabFragmentView;
import com.yizhuan.erban.ui.indicator_impl.IndicatorHelper;
import com.yizhuan.erban.ui.widget.OnPageSelectedListener;
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
@@ -31,8 +35,8 @@ import butterknife.Unbinder;
/**
* create by lvzebiao @2020/1/7
*/
public class SquareFragment extends BaseFragment {
public class SquareFragment extends BaseFragment implements TopMagicIndicatorAdapter.OnItemSelectListener{
public static final String TAG = "SquareFragment";
/**
* 推荐
*/
@@ -81,8 +85,15 @@ public class SquareFragment extends BaseFragment {
}
});
CommonNavigator commonNavigator = new CommonNavigator(getContext());
TopMagicIndicatorAdapter magicIndicatorAdapter = new TopMagicIndicatorAdapter(getContext(), tagList);
magicIndicatorAdapter.setOnItemSelectListener(this);
commonNavigator.setAdapter(magicIndicatorAdapter);
magicIndicator.setNavigator(commonNavigator);
//init indicator
IndicatorHelper.handle(getContext(), viewPager, magicIndicator, tagList);
ViewPagerHelper.bind(magicIndicator, viewPager);
tvScrollTop.setOnClickListener(new View.OnClickListener() {
@Override
@@ -101,6 +112,11 @@ public class SquareFragment extends BaseFragment {
}
@Override
public void onItemSelect(int position) {
viewPager.setCurrentItem(position);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -109,6 +125,7 @@ public class SquareFragment extends BaseFragment {
return mView;
}
@Override
public void onDestroyView() {
super.onDestroyView();

View File

@@ -70,7 +70,6 @@ public class QuickPassLoginAct extends BaseLoginAct implements View.OnClickListe
private QuickLogin login;// BUSINESS_ID为从易盾官网申请的业务id
private LinearLayout containerThirdPart;
private View vDivider;
private ImageView phoneLogin;
@@ -101,7 +100,6 @@ public class QuickPassLoginAct extends BaseLoginAct implements View.OnClickListe
setProtocol();
containerThirdPart = findViewById(R.id.container_third_part);
vDivider = findViewById(R.id.v_divider_third_part);
wxLogin = findViewById(R.id.img_wx_login);
qqLogin = findViewById(R.id.img_qq_login);
tvLoginTip = findViewById(R.id.tv_login_tip);
@@ -291,9 +289,6 @@ public class QuickPassLoginAct extends BaseLoginAct implements View.OnClickListe
containerThirdPart.setVisibility(isShowWechat || isShowQq ? View.VISIBLE : View.INVISIBLE);
}
if (vDivider != null) {
vDivider.setVisibility(isShowWechat && isShowQq ? View.VISIBLE : View.GONE);
}
super.showThirdPartLogin(isShowWechat, isShowQq);
}