import android.view.Menu;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
-import android.view.ViewGroup.LayoutParams;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
+import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
row.setOrientation(LinearLayout.HORIZONTAL);
result.addView(row);
+ {
+ final TextView textView = new TextView(parent.getContext());
+ final String name = application.getDictionaryName(dictionaryInfo.uncompressedFilename);
+ textView.setText(name);
+ textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);
+ row.addView(textView);
+ LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
+ layoutParams.weight = 1.0f;
+ textView.setLayoutParams(layoutParams);
+ }
+
final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
if ((!application.isDictionaryOnDevice(dictionaryInfo.uncompressedFilename) || updateAvailable) && downloadable != null) {
layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
downloadButton.setLayoutParams(layoutParams);
row.addView(downloadButton);
+ } else {
+ final ImageView checkMark = new ImageView(parent.getContext());
+ checkMark.setImageResource(R.drawable.btn_check_buttonless_on);
+ row.addView(checkMark);
}
- final TextView textView = new TextView(parent.getContext());
- final String name = application.getDictionaryName(dictionaryInfo.uncompressedFilename);
- textView.setText(name);
- textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);
- row.addView(textView);
-
// Add the information about each index.
final LinearLayout row2 = new LinearLayout(parent.getContext());
row2.setOrientation(LinearLayout.HORIZONTAL);