|
|
@@ -15,6 +15,7 @@ import android.os.Bundle; |
|
|
|
import android.provider.Settings; |
|
|
|
import android.view.LayoutInflater; |
|
|
|
import android.view.View; |
|
|
|
import android.widget.Button; |
|
|
|
import android.widget.LinearLayout; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
@@ -24,11 +25,13 @@ import com.bonait.bnframework.common.base.BaseFragment; |
|
|
|
import com.bonait.bnframework.common.constant.ConfigName; |
|
|
|
import com.bonait.bnframework.common.constant.Constants; |
|
|
|
import com.bonait.bnframework.common.constant.MessageName; |
|
|
|
import com.bonait.bnframework.common.helper.AuthorizeHelper; |
|
|
|
import com.bonait.bnframework.common.message.MessageManager; |
|
|
|
import com.bonait.bnframework.common.utils.AlertDialogUtils; |
|
|
|
import com.bonait.bnframework.common.utils.ToastUtils; |
|
|
|
import com.bonait.bnframework.common.utils.UpdateAppUtils; |
|
|
|
import com.bonait.bnframework.manager.ActivityLifecycleManager; |
|
|
|
import com.bonait.bnframework.modules.home.activity.BottomNavigation2Activity; |
|
|
|
import com.bonait.bnframework.modules.home.fragment.from.BunkerSetupActivity; |
|
|
|
import com.bonait.bnframework.modules.home.fragment.from.CpxzActivity; |
|
|
|
import com.bonait.bnframework.modules.home.fragment.from.DishTestActivity; |
|
|
@@ -51,6 +54,8 @@ public class Home4Fragment extends BaseFragment { |
|
|
|
|
|
|
|
@BindView(R.id.yauser_gn) |
|
|
|
LinearLayout yauser_gn;// |
|
|
|
@BindView(R.id.authorize) |
|
|
|
Button authorize;// |
|
|
|
private Context context; |
|
|
|
|
|
|
|
@Override |
|
|
@@ -66,6 +71,22 @@ public class Home4Fragment extends BaseFragment { |
|
|
|
context = getContext(); |
|
|
|
initTopBar(); |
|
|
|
initData(); |
|
|
|
new Thread(){ |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try{ |
|
|
|
Thread.sleep(3000); |
|
|
|
getActivity().runOnUiThread(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
authorize.setVisibility(ConfigName.getInstance().IsVisibleAuthorize?View.VISIBLE:View.GONE); |
|
|
|
} |
|
|
|
}); |
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}.start(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -80,7 +101,7 @@ public class Home4Fragment extends BaseFragment { |
|
|
|
* |
|
|
|
* @param view |
|
|
|
*/ |
|
|
|
@OnClick({R.id.kaishipengren, R.id.shebeikongzhi, R.id.zhuxiaodenglu |
|
|
|
@OnClick({R.id.kaishipengren, R.id.shebeikongzhi, R.id.zhuxiaodenglu,R.id.authorize |
|
|
|
, R.id.liaochangshezhi, R.id.caipinyanfa,R.id.check_update}) |
|
|
|
public void onViewClicked(View view) { |
|
|
|
switch (view.getId()) { |
|
|
@@ -93,6 +114,9 @@ public class Home4Fragment extends BaseFragment { |
|
|
|
case R.id.liaochangshezhi: |
|
|
|
OpenActivity(SystemParSetActivity.class); |
|
|
|
break; |
|
|
|
case R.id.authorize: |
|
|
|
AuthorizeHelper.AuthorizeDialog((AppCompatActivity)getActivity()); |
|
|
|
break; |
|
|
|
case R.id.check_update: |
|
|
|
checkPermission(); |
|
|
|
break; |
|
|
|