use of com.tbruyelle.rxpermissions3.RxPermissions in project RxEasyHttp by zhou-you.
the class LoginActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
mEmailView = (EditText) findViewById(R.id.email);
mPasswordView = (EditText) findViewById(R.id.password);
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
if (id == R.id.login || id == EditorInfo.IME_NULL) {
attemptLogin();
return true;
}
return false;
}
});
Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
mEmailSignInButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
attemptLogin();
}
});
mEmailView.setText("18688994275");
mPasswordView.setText("123456");
rxPermissions = new RxPermissions(this);
autoLogin();
}
use of com.tbruyelle.rxpermissions3.RxPermissions in project music-player by Anrimian.
the class StartFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
rxPermissions = new RxPermissions(this);
viewBinding.progressStateView.onTryAgainClick(this::onTryAgainButtonClicked);
}
use of com.tbruyelle.rxpermissions3.RxPermissions in project music-player by Anrimian.
the class HeadsetSettingsFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
toolbar.setTitle(R.string.settings);
toolbar.setSubtitle(R.string.headset);
toolbar.setTitleClickListener(null);
rxPermissions = new RxPermissions(requireActivity());
SlidrPanel.simpleSwipeBack(viewBinding.clContainer, this, toolbar::onStackFragmentSlided);
onCheckChanged(viewBinding.cbPlayOnConnect, this::onPlayOnConnectChecked);
setChecked(viewBinding.cbPlayOnConnect, BluetoothConnectionReceiver.isEnabled(requireContext()));
}
use of com.tbruyelle.rxpermissions3.RxPermissions in project cuddly-octo-fortnight by prpr894.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
// getWindow().setStatusBarColor(getResources().getColor(R.color.colorPrimaryGray));
setContentView(R.layout.activity_main);
initView();
// 此处用来检查权限,判断运行系统SDK版本是否大于等于23(android6.0)
rxPermissions = new RxPermissions(this);
initReasionDialog();
initPermissionSettingDialog();
if (Build.VERSION.SDK_INT >= 23) {
checkPermissionNow();
}
}
Aggregations