1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-23 08:17:51 +00:00

Logcat count down gimmick

This commit is contained in:
M66B 2015-11-20 21:16:10 +01:00
parent c2b1dfc180
commit 9968111906

View file

@ -436,12 +436,18 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
// Handle logcat
view.setOnClickListener(new View.OnClickListener() {
private short tap = 0;
private Toast toast = Toast.makeText(ActivityMain.this, "", Toast.LENGTH_SHORT);
@Override
public void onClick(View view) {
if (++tap == 7) {
tap++;
if (tap == 7) {
tap = 0;
toast.cancel();
Util.sendLogcat(null, ActivityMain.this);
} else if (tap > 3) {
toast.setText(Integer.toString(7 - tap));
toast.show();
}
}
});