Skip to content

Commit

Permalink
Use flexbox for main activity layout
Browse files Browse the repository at this point in the history
  • Loading branch information
eltos committed Sep 24, 2021
1 parent c1512a1 commit 155de69
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 348 deletions.
1 change: 1 addition & 0 deletions testApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies {
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'com.google.zxing:core:3.3.3'
api project(path: ':simpledialogfragments')
}
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void run() {
.pos(R.string.nevermind)
.show(MainActivity.this, null, YES_NO_DIALOG);
}
}, 3000);
}, 7000);

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

Expand Down Expand Up @@ -708,9 +708,11 @@ public boolean onResult(@NonNull String dialogTag, int which, @NonNull Bundle ex
return true;
case BUTTON_NEGATIVE:
Toast.makeText(this, R.string.discarded, Toast.LENGTH_SHORT).show();
handler.removeCallbacksAndMessages(null);
return true;
case BUTTON_NEUTRAL:
case CANCELED:
handler.removeCallbacksAndMessages(null);
Toast.makeText(this, R.string.canceled, Toast.LENGTH_SHORT).show();
return true;
}
Expand Down
Loading

0 comments on commit 155de69

Please sign in to comment.