Logcat count down gimmick

This commit is contained in:
M66B 2015-11-20 21:16:10 +01:00
parent c2b1dfc180
commit 9968111906
1 changed files with 7 additions and 1 deletions

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();
}
}
});