Commit 93c9f846 by 王文龙

[fix]修复各种细节问题

parent 036e248b
...@@ -57,7 +57,7 @@ android { ...@@ -57,7 +57,7 @@ android {
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { variant.outputs.all {
outputFileName = "imclient_v${defaultConfig.versionName}_${releaseTimeFull()}_${buildType.name}.apk"; outputFileName = "imteacher_v${defaultConfig.versionName}_${releaseTimeFull()}_${buildType.name}.apk";
} }
} }
} }
...@@ -71,7 +71,7 @@ android { ...@@ -71,7 +71,7 @@ android {
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { variant.outputs.all {
outputFileName = "imclient_v${defaultConfig.versionName}_${releaseTimeFull()}_${buildType.name}.apk"; outputFileName = "imteacher_v${defaultConfig.versionName}_${releaseTimeFull()}_${buildType.name}.apk";
} }
} }
} }
...@@ -94,7 +94,7 @@ dependencies { ...@@ -94,7 +94,7 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:1.0.3'
implementation("com.offcn.live:titleview:1.1.0-s1") implementation("com.offcn.live:titleview:1.1.0-s1")
implementation("com.offcn.live:imsdk-kit:1.0.0.14") implementation("com.offcn.live:imsdk-kit:1.0.0.17")
// DB // DB
implementation 'org.greenrobot:greendao:3.2.2' implementation 'org.greenrobot:greendao:3.2.2'
......
...@@ -34,6 +34,8 @@ import java.sql.SQLInvalidAuthorizationSpecException; ...@@ -34,6 +34,8 @@ import java.sql.SQLInvalidAuthorizationSpecException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
/** /**
* 通讯录页 * 通讯录页
* *
...@@ -46,6 +48,7 @@ public class ContactListFragment extends BaseFragment { ...@@ -46,6 +48,7 @@ public class ContactListFragment extends BaseFragment {
private RelativeLayout mContainerContact; private RelativeLayout mContainerContact;
private AnimatedExpandableListView mRecyclerView; private AnimatedExpandableListView mRecyclerView;
private RelativeLayout mSearch; private RelativeLayout mSearch;
private SwipeRefreshLayout mSwipeRefreshLayout;
private List<ServerContactBean> friends = new ArrayList<>(); private List<ServerContactBean> friends = new ArrayList<>();
private ContactListExpandableAdapter mAdapter; private ContactListExpandableAdapter mAdapter;
...@@ -59,7 +62,15 @@ public class ContactListFragment extends BaseFragment { ...@@ -59,7 +62,15 @@ public class ContactListFragment extends BaseFragment {
protected void init(View view) { protected void init(View view) {
mContainerContact = view.findViewById(R.id.container_list); mContainerContact = view.findViewById(R.id.container_list);
mRecyclerView = view.findViewById(R.id.recycler_view); mRecyclerView = view.findViewById(R.id.recycler_view);
mSwipeRefreshLayout = view.findViewById(R.id.refresh_layout);
mSearch = view.findViewById(R.id.search); mSearch = view.findViewById(R.id.search);
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
getContactList();
}
});
mAdapter = new ContactListExpandableAdapter(getContext(), friends); mAdapter = new ContactListExpandableAdapter(getContext(), friends);
mRecyclerView.setAdapter(mAdapter); mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() { mRecyclerView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
...@@ -150,7 +161,6 @@ public class ContactListFragment extends BaseFragment { ...@@ -150,7 +161,6 @@ public class ContactListFragment extends BaseFragment {
}); });
getContactList(); getContactList();
} }
@Override @Override
...@@ -181,7 +191,7 @@ public class ContactListFragment extends BaseFragment { ...@@ -181,7 +191,7 @@ public class ContactListFragment extends BaseFragment {
return; return;
} }
showLoading(); // showLoading();
try { try {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
...@@ -195,19 +205,22 @@ public class ContactListFragment extends BaseFragment { ...@@ -195,19 +205,22 @@ public class ContactListFragment extends BaseFragment {
public void onResponse(JSONObject response) { public void onResponse(JSONObject response) {
ZGLLogUtils.e(TAG, "contact success " + response.toString()); ZGLLogUtils.e(TAG, "contact success " + response.toString());
dismissLoading(); dismissLoading();
if (mSwipeRefreshLayout != null) {
mSwipeRefreshLayout.setRefreshing(false);
}
UserBeanDaoManager.getInstance().deleteAll(); UserBeanDaoManager.getInstance().deleteAll();
try { try {
int rtnCode = response.getInt("code"); int rtnCode = response.getInt("code");
if (rtnCode == 0) { if (rtnCode == 0) {
ServerContactBeanWrapper beanWrapper = ZGLParseUtils.parseObjectByGson(response.getJSONObject("data").toString(), ServerContactBeanWrapper.class); ServerContactBeanWrapper beanWrapper = ZGLParseUtils.parseObjectByGson(response.getJSONObject("data").toString(), ServerContactBeanWrapper.class);
if (beanWrapper != null && !ValidateUtils.isEmpty(beanWrapper.user_list)) { if (beanWrapper != null) {
friends = beanWrapper.user_list; friends = beanWrapper.user_list;
exeContactList();
} else { } else {
// 数据为空 // 数据为空
showEmptyView();
friends.clear(); friends.clear();
} }
exeContactList();
} else if (rtnCode == 1 || rtnCode == 2) { } else if (rtnCode == 1 || rtnCode == 2) {
// {"code":1,"msg":"登陆过期,请重新登陆","params":{"im_token":"0XR5YOS6dg7x2lirfeX3CbjRLqPWmesaFbdsr\/M4IRZS4mYYyZILI82FT8dgqybCA4W+MxfjJDY=@ip6c.cn.rongnav.com;ip6c.cn.rongcfg.com"}} // {"code":1,"msg":"登陆过期,请重新登陆","params":{"im_token":"0XR5YOS6dg7x2lirfeX3CbjRLqPWmesaFbdsr\/M4IRZS4mYYyZILI82FT8dgqybCA4W+MxfjJDY=@ip6c.cn.rongnav.com;ip6c.cn.rongcfg.com"}}
Utils.logout(getActivity()); Utils.logout(getActivity());
...@@ -228,6 +241,9 @@ public class ContactListFragment extends BaseFragment { ...@@ -228,6 +241,9 @@ public class ContactListFragment extends BaseFragment {
public void onErrorResponse(VolleyError error) { public void onErrorResponse(VolleyError error) {
ZGLLogUtils.e(TAG, "contact error " + error.toString()); ZGLLogUtils.e(TAG, "contact error " + error.toString());
dismissLoading(); dismissLoading();
if (mSwipeRefreshLayout != null) {
mSwipeRefreshLayout.setRefreshing(false);
}
CommonUtils.showToast(getActivity(), error.toString()); CommonUtils.showToast(getActivity(), error.toString());
} }
} }
...@@ -250,6 +266,7 @@ public class ContactListFragment extends BaseFragment { ...@@ -250,6 +266,7 @@ public class ContactListFragment extends BaseFragment {
userBeanList.addAll(contactBean.getList()); userBeanList.addAll(contactBean.getList());
} }
UserBeanDaoManager.getInstance().insertMulti(userBeanList); UserBeanDaoManager.getInstance().insertMulti(userBeanList);
OIMSDK.getInstance().refreshUserData();
} else { } else {
showEmptyView(); showEmptyView();
UserBeanDaoManager.getInstance().deleteAll(); UserBeanDaoManager.getInstance().deleteAll();
......
...@@ -55,6 +55,7 @@ public class LoginActivity extends BaseActivity { ...@@ -55,6 +55,7 @@ public class LoginActivity extends BaseActivity {
mIvEye = findViewById(R.id.iv_eye); mIvEye = findViewById(R.id.iv_eye);
mIvClear.setOnClickListener(v -> mEtName.setText("")); mIvClear.setOnClickListener(v -> mEtName.setText(""));
mEtName.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
mIvEye.setOnClickListener(v -> { mIvEye.setOnClickListener(v -> {
if (isShowPassWord) { if (isShowPassWord) {
mIvEye.setImageDrawable(getResources().getDrawable(R.mipmap.ic_et_eye_on)); mIvEye.setImageDrawable(getResources().getDrawable(R.mipmap.ic_et_eye_on));
...@@ -97,7 +98,7 @@ public class LoginActivity extends BaseActivity { ...@@ -97,7 +98,7 @@ public class LoginActivity extends BaseActivity {
return; return;
} }
if (ValidateUtils.isEmpty(name) || ValidateUtils.isEmpty(pwd)) { if (ValidateUtils.isEmpty(name) || ValidateUtils.isEmpty(pwd)) {
CommonUtils.showToast(this, "请输入用户名或密码"); CommonUtils.showToast(this, "请输入工号或密码");
return; return;
} }
......
...@@ -10,6 +10,7 @@ import android.os.Handler; ...@@ -10,6 +10,7 @@ import android.os.Handler;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayout;
...@@ -17,18 +18,26 @@ import com.jyall.base.adapter.BaseVPAdapter; ...@@ -17,18 +18,26 @@ import com.jyall.base.adapter.BaseVPAdapter;
import com.jyall.base.base.BaseActivity; import com.jyall.base.base.BaseActivity;
import com.jyall.base.util.AppManager; import com.jyall.base.util.AppManager;
import com.jyall.base.util.CommonUtils; import com.jyall.base.util.CommonUtils;
import com.jyall.base.util.EventBusCenter;
import com.offcn.imclient.R; import com.offcn.imclient.R;
import com.offcn.imclient.bean.UserBean; import com.offcn.imclient.bean.UserBean;
import com.offcn.imclient.util.Constants;
import com.offcn.imclient.util.LoginManager; import com.offcn.imclient.util.LoginManager;
import com.offcn.imclient.util.UserBeanDaoManager; import com.offcn.imclient.util.UserBeanDaoManager;
import com.offcn.live.im.OIMCallback; import com.offcn.live.im.OIMCallback;
import com.offcn.live.im.OIMSDK; import com.offcn.live.im.OIMSDK;
import com.offcn.live.im.bean.OIMCode; import com.offcn.live.im.bean.OIMCode;
import com.offcn.live.im.bean.OIMMsg;
import com.offcn.live.im.util.ZGLCommonUtils; import com.offcn.live.im.util.ZGLCommonUtils;
import com.offcn.live.im.util.ZGLLogUtils; import com.offcn.live.im.util.ZGLLogUtils;
import com.offcn.live.imkit.ui.ChatListFragment; import com.offcn.live.imkit.ui.ChatListFragment;
import com.offcn.live.imkit.util.KitConstants;
import com.offcn.live.imkit.view.ScrollEnabledViewPager; import com.offcn.live.imkit.view.ScrollEnabledViewPager;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.w3c.dom.Text;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -43,6 +52,7 @@ public class MainActivity extends BaseActivity { ...@@ -43,6 +52,7 @@ public class MainActivity extends BaseActivity {
TabLayout mTabLayout; TabLayout mTabLayout;
ScrollEnabledViewPager mViewPager; ScrollEnabledViewPager mViewPager;
TextView mRedDot;
String[] titles = new String[]{"聊天", "通讯录", "我的"}; String[] titles = new String[]{"聊天", "通讯录", "我的"};
...@@ -54,8 +64,12 @@ public class MainActivity extends BaseActivity { ...@@ -54,8 +64,12 @@ public class MainActivity extends BaseActivity {
} }
@Override @Override
protected void initViewsAndEvents() { public boolean isRegisterEventBus() {
return true;
}
@Override
protected void initViewsAndEvents() {
mTabLayout = findViewById(R.id.tab_layout); mTabLayout = findViewById(R.id.tab_layout);
mViewPager = findViewById(R.id.view_pager); mViewPager = findViewById(R.id.view_pager);
...@@ -84,34 +98,36 @@ public class MainActivity extends BaseActivity { ...@@ -84,34 +98,36 @@ public class MainActivity extends BaseActivity {
|| code == OIMCode.Code_IM_Disconnect_Kick || code == OIMCode.Code_IM_Disconnect_Kick
|| code == OIMCode.Code_IM_Error_NoExist) { || code == OIMCode.Code_IM_Error_NoExist) {
// 此处注释。内部已调用 destroy() 方法。 // CommonUtils.showToast(MainActivity.this, "通道连接异常:" + OIMCode.getCodeDesc(MainActivity.this, code));
// OIMSDK.getInstance(DemoMainActivity.this).destroy();
// 注销登录信息
LoginManager.logout(MainActivity.this); LoginManager.logout(MainActivity.this);
UserBeanDaoManager.getInstance().deleteAll(); UserBeanDaoManager.getInstance().deleteAll();
Activity curActivity = AppManager.getAppManager().getCurrentActivity();
if (curActivity != null) { if (code == OIMCode.Code_IM_Disconnect_Kick) {
AlertDialog dialog = new AlertDialog.Builder(curActivity) Activity curActivity = AppManager.getAppManager().getCurrentActivity();
.setTitle("IM连接失败") if (curActivity != null) {
.setMessage(code + "," + error) AlertDialog dialog = new AlertDialog.Builder(curActivity)
.setPositiveButton("重新登录", new DialogInterface.OnClickListener() { .setTitle("下线通知")
@Override .setMessage(error)
public void onClick(DialogInterface dialog, int which) { .setPositiveButton("重新登录", new DialogInterface.OnClickListener() {
startActivity(new Intent(curActivity, LoginActivity.class)); @Override
AppManager.getAppManager().finishAllActivity(); public void onClick(DialogInterface dialog, int which) {
} startActivity(new Intent(curActivity, LoginActivity.class));
}) AppManager.getAppManager().finishAllActivity();
.setNegativeButton("我知道了", new DialogInterface.OnClickListener() { }
@Override })
public void onClick(DialogInterface dialog, int which) { .setNegativeButton("我知道了", new DialogInterface.OnClickListener() {
AppManager.getAppManager().AppExit(curActivity); @Override
} public void onClick(DialogInterface dialog, int which) {
}) AppManager.getAppManager().AppExit(curActivity);
.setCancelable(false) }
.create(); })
dialog.setCanceledOnTouchOutside(false); .setCancelable(false)
dialog.show(); .create();
dialog.setCanceledOnTouchOutside(false);
dialog.show();
}
} }
} }
} }
...@@ -147,6 +163,9 @@ public class MainActivity extends BaseActivity { ...@@ -147,6 +163,9 @@ public class MainActivity extends BaseActivity {
public void onTabSelected(TabLayout.Tab tab) { public void onTabSelected(TabLayout.Tab tab) {
mViewPager.setCurrentItem(tab.getPosition(), false); mViewPager.setCurrentItem(tab.getPosition(), false);
changeTabSelect(tab); //Tab获取焦点 changeTabSelect(tab); //Tab获取焦点
if (tab.getPosition() == 0) {
showDot(false);
}
} }
@Override @Override
...@@ -191,6 +210,9 @@ public class MainActivity extends BaseActivity { ...@@ -191,6 +210,9 @@ public class MainActivity extends BaseActivity {
if (index == 0) { if (index == 0) {
iv.setImageResource(R.mipmap.ic_chat_tab_on); iv.setImageResource(R.mipmap.ic_chat_tab_on);
title.setTextColor(getResources().getColor(R.color.colorPrimary)); title.setTextColor(getResources().getColor(R.color.colorPrimary));
mRedDot = view.findViewById(R.id.dot);
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) mRedDot.getLayoutParams();
layoutParams.rightMargin = CommonUtils.getScreenWidth(this) / 6 - CommonUtils.dp2px(this, 25);
} else if (index == 1) { } else if (index == 1) {
iv.setImageResource(R.mipmap.ic_contact_tab_off); iv.setImageResource(R.mipmap.ic_contact_tab_off);
title.setTextColor(getResources().getColor(R.color.color_333333)); title.setTextColor(getResources().getColor(R.color.color_333333));
...@@ -255,4 +277,26 @@ public class MainActivity extends BaseActivity { ...@@ -255,4 +277,26 @@ public class MainActivity extends BaseActivity {
} }
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventBus(EventBusCenter eventBusCenter) {
int eventCode = eventBusCenter.getEvenCode();
if (eventCode == Constants.EventCode.Code_Count_Changed) {
try {
int count = (int) eventBusCenter.getData();
if (count > 0) {
if (mViewPager.getCurrentItem() != 0) {
showDot(true);
}
}
} catch (Exception e) {
}
}
}
private void showDot(boolean show) {
mRedDot.setVisibility(show ? View.VISIBLE : View.GONE);
}
} }
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="10dp"
android:height="10dp" />
<solid android:color="@android:color/holo_red_light" />
</shape>
\ No newline at end of file
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="20dp" android:layout_margin="20dp"
android:paddingTop="@dimen/toolbar_padding_top"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:orientation="vertical"> android:orientation="vertical"
android:paddingTop="@dimen/toolbar_padding_top">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="60dp"
android:drawableTop="@mipmap/ic_logo" android:drawableTop="@mipmap/ic_logo"
android:drawablePadding="20dp" android:drawablePadding="20dp"
android:text="在线课堂教师版" android:text="在线课堂教师版"
...@@ -23,16 +23,16 @@ ...@@ -23,16 +23,16 @@
<RelativeLayout <RelativeLayout
android:id="@+id/rl_username" android:id="@+id/rl_username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_marginTop="40dp"> android:layout_marginTop="40dp">
<EditText <EditText
android:id="@+id/et_name" android:id="@+id/et_name"
style="@style/loginEditText" style="@style/loginEditText"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/iv_delete"
android:hint="请输入工号" android:hint="请输入工号"
android:inputType="textPassword" android:inputType="textPassword" />
android:maxLength="11" />
<ImageView <ImageView
android:id="@+id/iv_delete" android:id="@+id/iv_delete"
...@@ -42,18 +42,25 @@ ...@@ -42,18 +42,25 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="5dp" android:padding="5dp"
android:src="@mipmap/ic_et_clear" /> android:src="@mipmap/ic_et_clear" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@drawable/login_edit_line" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_password" android:id="@+id/rl_password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_marginTop="20dp"> android:layout_marginTop="10dp">
<EditText <EditText
android:id="@+id/et_pwd" android:id="@+id/et_pwd"
style="@style/loginEditText" style="@style/loginEditText"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/iv_eye"
android:hint="请输入密码" android:hint="请输入密码"
android:inputType="textPassword" /> android:inputType="textPassword" />
...@@ -65,6 +72,13 @@ ...@@ -65,6 +72,13 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="5dp" android:padding="5dp"
android:src="@mipmap/ic_et_eye_off" /> android:src="@mipmap/ic_et_eye_off" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@drawable/login_edit_line" />
</RelativeLayout> </RelativeLayout>
...@@ -88,7 +102,8 @@ ...@@ -88,7 +102,8 @@
android:gravity="center" android:gravity="center"
android:text="测试一键登录(lqy62094)" android:text="测试一键登录(lqy62094)"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="16sp" /> android:textSize="16sp"
android:visibility="visible" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -29,20 +29,27 @@ ...@@ -29,20 +29,27 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/container_list" android:id="@+id/refresh_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:layout_marginTop="15dp">
<com.offcn.imclient.view.AnimatedExpandableListView <RelativeLayout
android:id="@+id/recycler_view" android:id="@+id/container_list"
android:divider="@null"
android:childDivider="@null"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:groupIndicator="@null" /> android:layout_marginTop="15dp">
</RelativeLayout> <com.offcn.imclient.view.AnimatedExpandableListView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:childDivider="@null"
android:divider="@null"
android:groupIndicator="@null" />
</RelativeLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </LinearLayout>
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
android:id="@+id/iv_avatar" android:id="@+id/iv_avatar"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:scaleType="centerCrop" android:scaleType="centerCrop" />
android:src="@mipmap/ic_teacher" />
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_name"
......
...@@ -4,28 +4,45 @@ ...@@ -4,28 +4,45 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp"> android:layout_height="50dp">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_centerHorizontal="true"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:layout_centerInParent="true" android:layout_height="match_parent">
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_pic"
android:layout_width="20dp"
android:layout_height="20dp"
android:scaleType="centerCrop"
tools:src="@mipmap/ic_me_on" />
<TextView <LinearLayout
android:id="@+id/tv_title"
android:textSize="12sp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginTop="2dp" android:layout_centerInParent="true"
tools:text="我的" /> android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_pic"
android:layout_width="20dp"
android:layout_height="20dp"
android:scaleType="centerCrop"
tools:src="@mipmap/ic_chat_tab_off" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textSize="12sp"
tools:text="我的" />
</LinearLayout>
<TextView
android:id="@+id/dot"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:background="@drawable/bg_dot"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:textSize">15sp</item> <item name="android:textSize">15sp</item>
<item name="android:background">@null</item> <item name="android:background">@null</item>
<item name="android:drawablePadding">10dp</item>
<item name="android:drawableBottom">@drawable/login_edit_line</item>
<item name="android:textColorHint">#888888</item> <item name="android:textColorHint">#888888</item>
</style> </style>
</resources> </resources>
\ No newline at end of file
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 to comment