- final Button button = new Button(parent.getContext());
- final String name = application
- .getDictionaryName(dictionaryInfo.uncompressedFilename);
- button.setText(name);
- final IntentLauncher intentLauncher = new IntentLauncher(parent.getContext(),
- getLaunchIntent(application.getPath(dictionaryInfo.uncompressedFilename),
- 0, searchText.getText().toString())) {
- @Override
- protected void onGo() {
- dialog.dismiss();
- DictionaryActivity.this.finish();
+ for (int i = 0; i < dictionaryInfo.indexInfos.size(); ++i) {
+ final IndexInfo indexInfo = dictionaryInfo.indexInfos.get(i);
+ final Button button = new Button(parent.getContext());
+// final String name = application
+// .getDictionaryName(dictionaryInfo.uncompressedFilename);
+ button.setText(indexInfo.shortName);
+ final IntentLauncher intentLauncher = new IntentLauncher(parent.getContext(),
+ getLaunchIntent(application.getPath(dictionaryInfo.uncompressedFilename),
+ i, searchText.getText().toString())) {
+ @Override
+ protected void onGo() {
+ dialog.dismiss();
+ DictionaryActivity.this.finish();
+ };