1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-27 02:09:41 +00:00

Actual toast

This commit is contained in:
licaon-kter 2016-02-19 11:39:29 +02:00
parent 5fc001cb19
commit 6f5f4dcf89

View file

@ -135,6 +135,17 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
// Icon, no title
getSupportActionBar().setTitle(null);
// Netguard is busy
ivQueue.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
Toast toast = Toast.makeText(ActivityMain.this, R.string.msg_queue, Toast.LENGTH_LONG);
toast.setGravity(Gravity.TOP, actionView.getLeft(), actionView.getBottom());
toast.show();
return true;
}
});
// On/off switch
swEnabled.setChecked(enabled);
swEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {