增加对标题栏右侧按钮的显示/占位状态控制

This commit is contained in:
zengfantian 2015-10-29 21:52:46 +08:00
parent 3d1cf4da8b
commit 3d8c08a4a1
1 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,9 @@
package com.zftlive.android.library.base; package com.zftlive.android.library.base;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
@ -18,11 +22,9 @@ import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import android.widget.TextView; import android.widget.TextView;
import com.zftlive.android.library.MApplication; import com.zftlive.android.library.MApplication;
import com.zftlive.android.library.widget.SwipeBackLayout; import com.zftlive.android.library.widget.SwipeBackLayout;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/** /**
* android 系统中的四大组件之一Activity基类 * android 系统中的四大组件之一Activity基类
@ -381,9 +383,17 @@ public abstract class BaseActivity extends FragmentActivity implements IBaseActi
* 隐藏标题栏右侧[完成/提交]按钮 * 隐藏标题栏右侧[完成/提交]按钮
*/ */
public void hiddenRightDoneBtn() { public void hiddenRightDoneBtn() {
hiddenRightDoneBtn(View.GONE);
}
/**
* 隐藏标题栏右侧[完成/提交]按钮
* @param mViewStatus 按钮的状态 View.GONE/View.INVISIBLE
*/
public void hiddenRightDoneBtn(int mViewStatus) {
Button mDoneBtn = Button mDoneBtn =
(Button) findViewById(BaseView.gainResId(mApplication, BaseView.ID, "btn_done")); (Button) findViewById(BaseView.gainResId(mApplication, BaseView.ID, "btn_done"));
mDoneBtn.setVisibility(View.GONE); mDoneBtn.setVisibility(mViewStatus);
} }
/** /**