mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-29 23:09:48 +00:00
Rugelach
This commit is contained in:
parent
a5b83ec6f2
commit
b24b4ab7cc
7 changed files with 60 additions and 11 deletions
|
|
@ -538,6 +538,14 @@ public class CustomRomActivity extends AppCompatActivity {
|
|||
}
|
||||
});
|
||||
|
||||
LinearLayout lineardisclaimer = findViewById(R.id.lineardisclaimer);
|
||||
lineardisclaimer.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
VectrasApp.oneDialogNew(getString(R.string.dont_miss_out), getString(R.string.disclaimer_when_using_rom), getString(R.string.i_agree), false, false, CustomRomActivity.this);
|
||||
}
|
||||
});
|
||||
|
||||
modify = getIntent().getBooleanExtra("MODIFY", false);
|
||||
if (modify) {
|
||||
created = true;
|
||||
|
|
|
|||
|
|
@ -720,6 +720,23 @@ public class VectrasApp extends Application {
|
|||
alertDialog.show();
|
||||
}
|
||||
|
||||
public static void oneDialogNew(String _title, String _message, String _buttontext,boolean _cancel, boolean _finish, Activity _activity) {
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(_activity, R.style.MainDialogTheme).create();
|
||||
alertDialog.setTitle(_title);
|
||||
alertDialog.setMessage(_message);
|
||||
if (!_cancel) {
|
||||
alertDialog.setCancelable(false);
|
||||
}
|
||||
alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, _buttontext, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (_finish) {
|
||||
_activity.finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
public static void oneDialogWithContext(String _title, String _message, boolean _cancel, Context _context) {
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(_context, R.style.MainDialogTheme).create();
|
||||
alertDialog.setTitle(_title);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue