diff --git a/android/res/layout/download_item_country.xml b/android/res/layout/download_item_country.xml index 19e2a06e3a..97e1a4f546 100644 --- a/android/res/layout/download_item_country.xml +++ b/android/res/layout/download_item_country.xml @@ -1,63 +1,45 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:minHeight="?android:attr/listPreferredItemHeight"> - + - - - - - - - - - - - - - + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_gravity="center" + android:paddingLeft="@dimen/dp_x_3" + android:paddingRight="@dimen/dp_x_3" + android:scaleType="center"/> + + + + + \ No newline at end of file diff --git a/android/src/com/mapswithme/country/DownloadAdapter.java b/android/src/com/mapswithme/country/DownloadAdapter.java index 53701d1f92..250128abfa 100644 --- a/android/src/com/mapswithme/country/DownloadAdapter.java +++ b/android/src/com/mapswithme/country/DownloadAdapter.java @@ -1,10 +1,5 @@ package com.mapswithme.country; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; @@ -39,6 +34,11 @@ import com.mapswithme.util.UiUtils; import com.mapswithme.util.Utils; import com.mapswithme.util.statistics.Statistics; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + /// ListView adapter class DownloadAdapter extends BaseAdapter { @@ -374,14 +374,12 @@ class DownloadAdapter extends BaseAdapter { public TextView mName = null; public ImageView mFlag = null; - public ImageView mGuide = null; public ProgressBar mProgress = null; void initFromView(View v) { mName = (TextView) v.findViewById(R.id.title); mFlag = (ImageView) v.findViewById(R.id.country_flag); - mGuide = (ImageView) v.findViewById(R.id.guide_available); mProgress = (ProgressBar) v.findViewById(R.id.download_progress); } } @@ -457,7 +455,6 @@ class DownloadAdapter extends BaseAdapter // this part if only for downloadable items if (type != TYPE_COUNTRY_GROUP) { - populateForGuide(position, holder); setUpProgress(holder, type, position); } } @@ -509,19 +506,6 @@ class DownloadAdapter extends BaseAdapter holder.mName.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null); } - private void populateForGuide(int position, DownloadAdapter.ViewHolder holder) - { - if (mHasGoogleStore) - { - final CountryItem item = getItem(position); - final GuideInfo gi = Framework.getGuideInfoForIndexWithApiCheck(item.mCountryIdx); - if (gi != null) - UiUtils.show(holder.mGuide); - else - UiUtils.hide(holder.mGuide); - } - } - /// Get list item position by index(g, c, r). /// @return -1 If no such item in display list. private int getItemPosition(Index idx)