Skip to content

Commit 155de69

Browse files
committed
Use flexbox for main activity layout
1 parent c1512a1 commit 155de69

File tree

3 files changed

+128
-348
lines changed

3 files changed

+128
-348
lines changed

testApp/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies {
2323
testImplementation 'junit:junit:4.12'
2424
implementation 'androidx.appcompat:appcompat:1.2.0'
2525
implementation 'com.google.android.material:material:1.2.1'
26+
implementation 'com.google.android.flexbox:flexbox:3.0.0'
2627
implementation 'com.google.zxing:core:3.3.3'
2728
api project(path: ':simpledialogfragments')
2829
}

testApp/src/main/java/eltos/simpledialogfragments/MainActivity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void run() {
262262
.pos(R.string.nevermind)
263263
.show(MainActivity.this, null, YES_NO_DIALOG);
264264
}
265-
}, 3000);
265+
}, 7000);
266266

267267
/** Results: {@link MainActivity#onResult} **/
268268

@@ -708,9 +708,11 @@ public boolean onResult(@NonNull String dialogTag, int which, @NonNull Bundle ex
708708
return true;
709709
case BUTTON_NEGATIVE:
710710
Toast.makeText(this, R.string.discarded, Toast.LENGTH_SHORT).show();
711+
handler.removeCallbacksAndMessages(null);
711712
return true;
712713
case BUTTON_NEUTRAL:
713714
case CANCELED:
715+
handler.removeCallbacksAndMessages(null);
714716
Toast.makeText(this, R.string.canceled, Toast.LENGTH_SHORT).show();
715717
return true;
716718
}

0 commit comments

Comments
 (0)