mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Merged '294bbd5' from release-2.5: Force max lines in snackbar to 2 on tablet to match phone
This commit is contained in:
commit
a5f692283d
@ -441,8 +441,11 @@ public class AnkiActivity extends AppCompatActivity implements LoaderManager.Loa
|
|||||||
View view = sb.getView();
|
View view = sb.getView();
|
||||||
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
|
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
|
||||||
TextView action = (TextView) view.findViewById(android.support.design.R.id.snackbar_action);
|
TextView action = (TextView) view.findViewById(android.support.design.R.id.snackbar_action);
|
||||||
tv.setTextColor(Color.WHITE);
|
if (tv != null && action != null) {
|
||||||
action.setTextColor(getResources().getColor(R.color.theme_primary));
|
tv.setTextColor(Color.WHITE);
|
||||||
|
action.setTextColor(getResources().getColor(R.color.theme_primary));
|
||||||
|
tv.setMaxLines(2); // prevent tablets from truncating to 1 line
|
||||||
|
}
|
||||||
sb.show();
|
sb.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user