| | |
| | | public abstract class SlabBaseActivity extends RxFragmentActivity { |
| | | |
| | | private ProgressDialog dialog; |
| | | protected ViewHolder mHolder; |
| | | protected int mScreenWidth;//设备宽 |
| | | protected int mScreenHeight;//设备高 |
| | | public static final int REQUEST_NORMAL = 43214; |
| | |
| | | |
| | | mScreenHeight = DensityUtil.getDeviceHeight(this); |
| | | mScreenWidth = DensityUtil.getDeviceWidth(this); |
| | | mHolder = new ViewHolder(this); |
| | | |
| | | mNetChangeObserver = new NetChangeObserver() { |
| | | @Override |
| | |
| | | |
| | | } |
| | | |
| | | if (mHolder!=null){ |
| | | mHolder.unBind(); |
| | | } |
| | | dismissDialog(); |
| | | if (!compositeSubscription.isDisposed()){ |
| | | compositeSubscription.dispose(); |
| | |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | protected <T extends View> T bind(int resId){ |
| | | return (T) mHolder.bind(resId); |
| | | return (T) findViewById(resId); |
| | | } |
| | | |
| | | /** |