0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00

Merge pull request #3889 from timrae/snackbar-max-lines

Force max lines in snackbar to 2 on tablet to match phone
This commit is contained in:
Tim Rae 2015-11-28 12:32:10 +09:00
commit 294bbd5d4f

View File

@ -441,8 +441,11 @@ public class AnkiActivity extends AppCompatActivity implements LoaderManager.Loa
View view = sb.getView();
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
TextView action = (TextView) view.findViewById(android.support.design.R.id.snackbar_action);
tv.setTextColor(Color.WHITE);
action.setTextColor(getResources().getColor(R.color.theme_primary));
if (tv != null && action != null) {
tv.setTextColor(Color.WHITE);
action.setTextColor(getResources().getColor(R.color.theme_primary));
tv.setMaxLines(2); // prevent tablets from truncating to 1 line
}
sb.show();
}