move code to fkt
This commit is contained in:
parent
c82a532800
commit
bd633df140
1 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue