Commit e2aa10f7 by han xu

学习名称判断

parent b31ef2af
......@@ -10,7 +10,7 @@
android:layout_width="wrap_content"
android:layout_height="40dp"
android:gravity="center|bottom"
android:text="AI"
android:text=""
android:textColor="@color/common_red"
android:textSize="28sp"
android:textStyle="bold" />
......@@ -20,7 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="智能助手"
android:text=""
android:textColor="#585858"
android:textSize="13.3sp" />
......
......@@ -113,7 +113,13 @@ public class HomeLearnFragment extends BaseFragment<SImplePresenter, FragmentHom
String url = data.getPaperListUrl() + "?accountId=" + mUserInfo.getAccountId() + "&token=" + mUserInfo.getToken();
webFragment.setUrl(url);
setTabNum();
if (data.getEnterKnowledge() == 1) {
setTabNum(1);
} else {
setTabNum(2);
}
}));
}
......@@ -182,11 +188,11 @@ public class HomeLearnFragment extends BaseFragment<SImplePresenter, FragmentHom
}
});
setTabNum();
setTabNum(0);
mBind.tabLearn.getTabAt(0).select();
}
public void setTabNum() {
public void setTabNum(Integer type) {
// EventBus.getDefault().post(new LearnTabNumEvent(1));
int[] tabNum;
if (tabBean != null) {
......@@ -205,7 +211,24 @@ public class HomeLearnFragment extends BaseFragment<SImplePresenter, FragmentHom
isFirstAddTab = false;
} else {
for (int i = 0; i < mBind.tabLearn.getTabCount(); i++) {
if (i == mBind.tabLearn.getTabCount() - 1) return;
if (i == mBind.tabLearn.getTabCount() - 1){
TextView tv = mBind.tabLearn.getTabAt(i).getCustomView().findViewById(R.id.tabtext);
TextView tvIcon = mBind.tabLearn.getTabAt(i).getCustomView().findViewById(R.id.tabicon);
if (type == 1){
tv.setText("知识库");
tv.setTextSize(16);
tv.setTextColor(getResources().getColor(R.color.black));
tvIcon.setText("");
} else if (type == 2) {
tv.setText("AI");
// tv.setTextSize(16);
// tv.setTextColor(getResources().getColor(R.color.black));
tvIcon.setText("智能助手");
}
return;
}
TextView tv = mBind.tabLearn.getTabAt(i).getCustomView().findViewById(R.id.tabtext);
TextView tvIcon = mBind.tabLearn.getTabAt(i).getCustomView().findViewById(R.id.tabicon);
tvIcon.setText(tabDesc[i]);
......
......@@ -811,7 +811,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
ToastUtils.showShortToast("开始服务操作成功");
ProgressUtil.stopLoad();
mPresenter.setPosition(position);
mPresenter.refreshClear();
// mPresenter.refreshClear();
EventBus.getDefault().post(new RefreshServe(1));
}else{
ProgressUtil.stopLoad();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment