Fix #8861 [Samsung Galaxy Tab S3] Texts are cut off
This commit is contained in:
parent
208727a78f
commit
a5c802f632
3 changed files with 17 additions and 24 deletions
|
@ -2,7 +2,7 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/bg_color"
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:minHeight="@dimen/list_item_height"
|
android:minHeight="@dimen/list_item_height"
|
||||||
|
@ -16,9 +16,10 @@
|
||||||
android:layout_marginStart="@dimen/list_content_padding"
|
android:layout_marginStart="@dimen/list_content_padding"
|
||||||
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
||||||
android:layout_marginEnd="@dimen/favorites_icon_right_margin"
|
android:layout_marginEnd="@dimen/favorites_icon_right_margin"
|
||||||
android:layout_marginTop="@dimen/favorites_icon_top_margin"
|
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:src="@drawable/ic_map"/>
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@drawable/ic_map"
|
||||||
|
android:contentDescription="@string/map_downloaded" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/card_row_min_height"
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="@dimen/card_row_min_height"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.util.TypedValue;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AbsListView;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.ExpandableListView;
|
import android.widget.ExpandableListView;
|
||||||
|
@ -547,15 +546,12 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class LocalFullMapsViewHolder {
|
private static class LocalFullMapsViewHolder {
|
||||||
public static final int UPDATES_ENABLED_ITEM_HEIGHT = 72;
|
|
||||||
public static final int UPDATES_DISABLED_ITEM_HEIGHT = 50;
|
|
||||||
private final ImageView icon;
|
private final ImageView icon;
|
||||||
private final TextView nameTextView;
|
private final TextView nameTextView;
|
||||||
private final TextView subheaderTextView;
|
private final TextView subheaderTextView;
|
||||||
private final TextView descriptionTextView;
|
private final TextView descriptionTextView;
|
||||||
private final ImageButton options;
|
private final ImageButton options;
|
||||||
private final LiveUpdatesFragment fragment;
|
private final LiveUpdatesFragment fragment;
|
||||||
private final View view;
|
|
||||||
private final int secondaryColor;
|
private final int secondaryColor;
|
||||||
private final View divider;
|
private final View divider;
|
||||||
|
|
||||||
|
@ -565,7 +561,6 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
subheaderTextView = (TextView) view.findViewById(R.id.subheaderTextView);
|
subheaderTextView = (TextView) view.findViewById(R.id.subheaderTextView);
|
||||||
descriptionTextView = (TextView) view.findViewById(R.id.descriptionTextView);
|
descriptionTextView = (TextView) view.findViewById(R.id.descriptionTextView);
|
||||||
options = (ImageButton) view.findViewById(R.id.options);
|
options = (ImageButton) view.findViewById(R.id.options);
|
||||||
this.view = view;
|
|
||||||
this.fragment = context;
|
this.fragment = context;
|
||||||
|
|
||||||
TypedValue typedValue = new TypedValue();
|
TypedValue typedValue = new TypedValue();
|
||||||
|
@ -582,7 +577,6 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
IncrementalChangesManager changesManager = context.getResourceManager().getChangesManager();
|
IncrementalChangesManager changesManager = context.getResourceManager().getChangesManager();
|
||||||
|
|
||||||
nameTextView.setText(getNameToDisplay(item, fragment.getMyActivity()));
|
nameTextView.setText(getNameToDisplay(item, fragment.getMyActivity()));
|
||||||
AbsListView.LayoutParams layoutParams = (AbsListView.LayoutParams) view.getLayoutParams();
|
|
||||||
if (shouldUpdatePreference.get()) {
|
if (shouldUpdatePreference.get()) {
|
||||||
final Integer frequencyId = preferenceUpdateFrequency(item, fragment.getSettings()).get();
|
final Integer frequencyId = preferenceUpdateFrequency(item, fragment.getSettings()).get();
|
||||||
final Integer timeOfDateToUpdateId = preferenceTimeOfDayToUpdate(item, fragment.getSettings()).get();
|
final Integer timeOfDateToUpdateId = preferenceTimeOfDayToUpdate(item, fragment.getSettings()).get();
|
||||||
|
@ -598,14 +592,11 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
.getColor(R.color.osmand_orange));
|
.getColor(R.color.osmand_orange));
|
||||||
icon.setImageDrawable(fragment.getIcon(R.drawable.ic_map, R.color.osmand_orange));
|
icon.setImageDrawable(fragment.getIcon(R.drawable.ic_map, R.color.osmand_orange));
|
||||||
options.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_overflow_menu_white));
|
options.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
layoutParams.height = (int) dpToPx(view.getContext(), UPDATES_ENABLED_ITEM_HEIGHT);
|
|
||||||
} else {
|
} else {
|
||||||
subheaderTextView.setVisibility(View.GONE);
|
subheaderTextView.setVisibility(View.GONE);
|
||||||
icon.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_map));
|
icon.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_map));
|
||||||
options.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_action_plus));
|
options.setImageDrawable(getSecondaryColorPaintedIcon(R.drawable.ic_action_plus));
|
||||||
layoutParams.height = (int) dpToPx(view.getContext(), UPDATES_DISABLED_ITEM_HEIGHT);
|
|
||||||
}
|
}
|
||||||
view.setLayoutParams(layoutParams);
|
|
||||||
|
|
||||||
final String fileNameWithoutExtension =
|
final String fileNameWithoutExtension =
|
||||||
Algorithms.getFileNameWithoutExtension(new File(item));
|
Algorithms.getFileNameWithoutExtension(new File(item));
|
||||||
|
|
Loading…
Reference in a new issue