move code to fkt

This commit is contained in:
ligi 2014-05-04 17:49:36 +02:00
parent c82a532800
commit bd633df140

View file

@ -280,18 +280,19 @@ public class TicketListActivity extends ActionBarActivity {
supportInvalidateOptionsMenu();
String html;
if (scanning) {
html = getString(R.string.scan_empty_text);
} else {
html = getString(R.string.no_passes_empty_text);
}
emptyView.setText(Html.fromHtml(html));
emptyView.setText(Html.fromHtml(getHtmlForEmptViewDependingOnScaningState()));
emptyView.setMovementMethod(LinkMovementMethod.getInstance());
}
public String getHtmlForEmptViewDependingOnScaningState() {
if (scanning) {
return getString(R.string.scan_empty_text);
} else {
return getString(R.string.no_passes_empty_text);
}
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);