X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryActivity.java;h=356e957ebaf8788645e898a1ac3d6b801ba04e7b;hb=7d31142fbfb0ace1d668e9b8b6e723a1dc4ffe0b;hp=c79faf32c77e4384867e54a8745839b5e8f28c4b;hpb=4a10dd5991249717718c65a369f0e72fec93a672;p=Dictionary.git diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index c79faf3..356e957 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -367,6 +367,7 @@ public class DictionaryActivity extends ActionBarActivity { } Log.d(LOG, "Loading index " + indexIndex); index = dictionary.indices.get(indexIndex); + getListView().setEmptyView(findViewById(android.R.id.empty)); setListAdapter(new IndexAdapter(index)); // Pre-load the collators. @@ -448,6 +449,21 @@ public class DictionaryActivity extends ActionBarActivity { onCreateSetupActionBarAndSearchView(); + View floatSwapButton = findViewById(R.id.floatSwapButton); + floatSwapButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View arg0) { + onLanguageButtonClick(); + } + }); + floatSwapButton.setOnLongClickListener(new OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + onLanguageButtonLongClick(v.getContext()); + return true; + } + }); + // Set the search text from the intent, then the saved state. String text = getIntent().getStringExtra(C.SEARCH_TOKEN); if (savedInstanceState != null) {