mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
Fix invalid cast: onSystemUiVisibilityChange
LinearLayout had changed to a FrameLayout Also add a lint check to ensure this doesn't happen in the future Fixes 6977
This commit is contained in:
parent
03461ab949
commit
f04aae0a4f
@ -45,9 +45,9 @@ public class CompatV19 extends CompatV18 implements Compat {
|
||||
(new View.OnSystemUiVisibilityChangeListener() {
|
||||
@Override
|
||||
public void onSystemUiVisibilityChange(int flags) {
|
||||
final Toolbar toolbar = (Toolbar) a.findViewById(R.id.toolbar);
|
||||
final LinearLayout answerButtons = (LinearLayout) a.findViewById(R.id.answer_options_layout);
|
||||
final RelativeLayout topbar = (RelativeLayout) a.findViewById(R.id.top_bar);
|
||||
final View toolbar = a.findViewById(R.id.toolbar);
|
||||
final View answerButtons = a.findViewById(R.id.answer_options_layout);
|
||||
final View topbar = a.findViewById(R.id.top_bar);
|
||||
if (toolbar == null || topbar == null || answerButtons == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ tasks.whenTaskAdded { task ->
|
||||
task.doFirst {
|
||||
android.lintOptions.abortOnError = true
|
||||
android.lintOptions.warningsAsErrors true
|
||||
android.lintOptions.check 'NewApi', 'InlinedApi'
|
||||
android.lintOptions.check 'NewApi', 'InlinedApi', 'WrongViewCast'
|
||||
}
|
||||
} else {
|
||||
task.doFirst {
|
||||
|
Loading…
Reference in New Issue
Block a user