+ final DictionaryInfo dictionaryInfo = getItem(position);\r
+ for (int i = 0; i < dictionaryInfo.indexInfos.size(); ++i) {\r
+ final IndexInfo indexInfo = dictionaryInfo.indexInfos.get(i);\r
+ final Button button = new Button(parent.getContext());\r
+ String name = application.getLanguageName(indexInfo.shortName);\r
+ if (name == null) {\r
+ name = indexInfo.shortName;\r
+ }\r
+ button.setText(name);\r
+ final IntentLauncher intentLauncher = new IntentLauncher(parent.getContext(), getLaunchIntent(application.getPath(dictionaryInfo.uncompressedFilename), i, "")) {\r
+ @Override\r
+ protected void onGo() {\r
+ dialog.dismiss();\r
+ DictionaryActivity.this.finish();\r
+ };\r
+ };\r
+ button.setOnClickListener(intentLauncher);\r
+ \r
+ final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\r
+ layoutParams.width = 0;\r
+ layoutParams.weight = 1.0f;\r
+ button.setLayoutParams(layoutParams);\r
+\r
+ result.addView(button);\r
+ }\r