Don't show images row on api less than 17
This commit is contained in:
parent
a0bb8852d2
commit
3485cde011
2 changed files with 32 additions and 23 deletions
|
@ -43,6 +43,7 @@
|
|||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/images_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
|
|
|
@ -18,6 +18,7 @@ import android.widget.TextView;
|
|||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.plus.base.BottomSheetDialogFragment;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
|
||||
|
@ -45,11 +46,12 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends BottomSheetDialogFr
|
|||
AndroidUtils.setBackground(getActivity(), mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
mainView.findViewById(R.id.images_row).setVisibility(View.GONE);
|
||||
} else {
|
||||
final ImageView routePointImage = (ImageView) mainView.findViewById(R.id.route_point_image);
|
||||
ImageView lineImage = (ImageView) mainView.findViewById(R.id.line_image);
|
||||
if (nightMode) {
|
||||
((TextView) mainView.findViewById(R.id.save_as_new_track_title)).setTextColor(getResources().getColor(R.color.ctx_menu_info_text_dark));
|
||||
|
||||
routePointImage.setImageResource(R.drawable.img_help_trip_route_points_night);
|
||||
lineImage.setImageResource(R.drawable.img_help_trip_track_night);
|
||||
} else {
|
||||
|
@ -57,9 +59,6 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends BottomSheetDialogFr
|
|||
lineImage.setImageResource(R.drawable.img_help_trip_track_day);
|
||||
}
|
||||
|
||||
((ImageView) mainView.findViewById(R.id.route_point_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_route_points));
|
||||
((ImageView) mainView.findViewById(R.id.line_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_split_interval));
|
||||
|
||||
mainView.findViewById(R.id.line_text).setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
|
@ -67,7 +66,6 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends BottomSheetDialogFr
|
|||
}
|
||||
});
|
||||
lineImage.setOnClickListener(saveAsLineOnClickListener);
|
||||
mainView.findViewById(R.id.save_as_line_row).setOnClickListener(saveAsLineOnClickListener);
|
||||
|
||||
mainView.findViewById(R.id.route_point_text).setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
|
@ -76,6 +74,16 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends BottomSheetDialogFr
|
|||
}
|
||||
});
|
||||
routePointImage.setOnClickListener(saveAsLineOnClickListener);
|
||||
}
|
||||
|
||||
if (nightMode) {
|
||||
((TextView) mainView.findViewById(R.id.save_as_new_track_title)).setTextColor(getResources().getColor(R.color.ctx_menu_info_text_dark));
|
||||
}
|
||||
|
||||
((ImageView) mainView.findViewById(R.id.route_point_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_route_points));
|
||||
((ImageView) mainView.findViewById(R.id.line_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_split_interval));
|
||||
|
||||
mainView.findViewById(R.id.save_as_line_row).setOnClickListener(saveAsLineOnClickListener);
|
||||
mainView.findViewById(R.id.save_as_route_point_row).setOnClickListener(saveAsRoutePointOnClickListener);
|
||||
|
||||
mainView.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() {
|
||||
|
|
Loading…
Reference in a new issue