Commit 3909048b1829c281e0a12be03ad3adc0f7a98435
1 parent
fbd004dd
Exists in
yxb_dev
and in
2 other branches
no message
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... | ... | @@ -157,13 +157,15 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
157 | 157 | } |
158 | 158 | |
159 | 159 | private void clearUerinfo() { |
160 | - AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_IMAGE, ""); | |
161 | - AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, ""); | |
162 | - AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, ""); | |
163 | - AppConfig.ISLOGIN=false; | |
164 | - setPersonInfo(); | |
165 | - startNewActivity(LoginAndRegistActivity.class); | |
166 | - getActivity().finish(); | |
160 | + if(AppConfig.ISLOGIN) { | |
161 | + AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_IMAGE, ""); | |
162 | + AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, ""); | |
163 | + AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, ""); | |
164 | + AppConfig.ISLOGIN = false; | |
165 | + setPersonInfo(); | |
166 | + startActivity(new Intent().putExtra("type", "登录").setClass(getActivity(), LoginAndRegistActivity.class)); | |
167 | + getActivity().finish(); | |
168 | + } | |
167 | 169 | } |
168 | 170 | |
169 | 171 | @Override | ... | ... |
app/src/main/res/layout/fragment_mine.xml
... | ... | @@ -298,12 +298,12 @@ |
298 | 298 | android:layout_marginLeft="15dp" |
299 | 299 | android:layout_marginRight="15dp" |
300 | 300 | android:background="@color/bottomline" /> |
301 | + | |
301 | 302 | <LinearLayout |
302 | 303 | android:id="@+id/layout_about" |
303 | 304 | android:layout_width="match_parent" |
304 | 305 | android:layout_height="?android:actionBarSize" |
305 | - android:gravity="center_vertical" | |
306 | - > | |
306 | + android:gravity="center_vertical"> | |
307 | 307 | |
308 | 308 | <TextView |
309 | 309 | android:layout_width="25dp" | ... | ... |