Commit 4d34c706 authored by 贾海然's avatar 贾海然

添加登出按钮

parent a4c16dbc
Pipeline #146 failed with stages
......@@ -183,8 +183,7 @@ public class FirstFragment extends BaseFragment implements View.OnClickListener
homeRecordAdapter.notifyDataSetChanged();
todayStudyPlanRl.setVisibility(View.VISIBLE);
} else {
// todayStudyPlanRl.setVisibility(View.GONE);
todayStudyPlanRl.setVisibility(View.GONE);
}
}
......
......@@ -41,6 +41,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
private TextView mTvChangePsw, mTvName, mTvSchool, mTvPhone, mTvProvince;
private String oldpassword_MD5;
private String newpassword_MD5;
private TextView tvLogout;
@Override
public int setLayout() {
......@@ -55,6 +56,8 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
mTvPhone = view.findViewById(R.id.tv_phone);
mTvProvince = view.findViewById(R.id.tv_province);
mTvChangePsw.setOnClickListener(this);
tvLogout = view.findViewById(R.id.tv_logout);
tvLogout.setOnClickListener(this);
}
@Override
......@@ -156,6 +159,14 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
startActivity(new Intent(getActivity(), LoginActivity.class));
getActivity().finish();
break;
//新增退出账号功能 测试用
case R.id.tv_logout:
startActivity (new Intent(getActivity(), LoginActivity.class));
SpUtil.getInstace().clear();
getActivity().finish();
break;
}
}
......
......@@ -254,5 +254,15 @@
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_logout"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_margin="15dp"
android:text="退出登录"
android:textColor="#ffffffff"
android:textSize="19sp" />
</LinearLayout>
</LinearLayout>
\ 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