UI styling
This commit is contained in:
parent
2c978ca55e
commit
2958bdd454
8 changed files with 18 additions and 8 deletions
|
@ -346,7 +346,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:text="@string/shared_string_cancel"
|
android:text="@string/shared_string_close"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
android:textColor="?attr/color_dialog_buttons"
|
android:textColor="?attr/color_dialog_buttons"
|
||||||
android:textSize="@dimen/default_desc_text_size"
|
android:textSize="@dimen/default_desc_text_size"
|
||||||
|
|
|
@ -59,7 +59,14 @@ public class HistoryMarkerMenuBottomSheetDialogFragment extends BottomSheetDialo
|
||||||
long markerVisitedDate = arguments.getLong(MARKER_VISITED_DATE);
|
long markerVisitedDate = arguments.getLong(MARKER_VISITED_DATE);
|
||||||
((TextView) mainView.findViewById(R.id.map_marker_title)).setText(markerName);
|
((TextView) mainView.findViewById(R.id.map_marker_title)).setText(markerName);
|
||||||
((ImageView) mainView.findViewById(R.id.map_marker_icon)).setImageDrawable(getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(markerColorIndex)));
|
((ImageView) mainView.findViewById(R.id.map_marker_icon)).setImageDrawable(getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(markerColorIndex)));
|
||||||
((TextView) mainView.findViewById(R.id.map_marker_passed_info)).setText(getString(R.string.passed, new SimpleDateFormat("MMM dd", Locale.getDefault()).format(new Date(markerVisitedDate))));
|
Date date = new Date(markerVisitedDate);
|
||||||
|
String month = new SimpleDateFormat("MMM", Locale.getDefault()).format(date);
|
||||||
|
if (month.length() > 1) {
|
||||||
|
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
||||||
|
}
|
||||||
|
month = month.replaceAll("\\.", "");
|
||||||
|
String day = new SimpleDateFormat("d", Locale.getDefault()).format(date);
|
||||||
|
((TextView) mainView.findViewById(R.id.map_marker_passed_info)).setText(getString(R.string.passed, month + " " + day));
|
||||||
|
|
||||||
mainView.findViewById(R.id.make_active_row).setOnClickListener(new View.OnClickListener() {
|
mainView.findViewById(R.id.make_active_row).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class MapMarkersActiveFragment extends Fragment implements OsmAndCompassL
|
||||||
final RecyclerView recyclerView = new RecyclerView(getContext());
|
final RecyclerView recyclerView = new RecyclerView(getContext());
|
||||||
final MapActivity mapActivity = (MapActivity) getActivity();
|
final MapActivity mapActivity = (MapActivity) getActivity();
|
||||||
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
||||||
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 8 : 12));
|
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 52 : 78));
|
||||||
recyclerView.setClipToPadding(false);
|
recyclerView.setClipToPadding(false);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
||||||
final boolean night = !mapActivity.getMyApplication().getSettings().isLightContent();
|
final boolean night = !mapActivity.getMyApplication().getSettings().isLightContent();
|
||||||
final RecyclerView recyclerView = new RecyclerView(getContext());
|
final RecyclerView recyclerView = new RecyclerView(getContext());
|
||||||
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
||||||
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 8 : 12));
|
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 52 : 78));
|
||||||
recyclerView.setClipToPadding(false);
|
recyclerView.setClipToPadding(false);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class MapMarkersHistoryFragment extends Fragment implements MapMarkersHel
|
||||||
|
|
||||||
final RecyclerView recyclerView = new RecyclerView(getContext());
|
final RecyclerView recyclerView = new RecyclerView(getContext());
|
||||||
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
||||||
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 8 : 12));
|
recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(mapActivity, isSmartphone ? 52 : 78));
|
||||||
recyclerView.setClipToPadding(false);
|
recyclerView.setClipToPadding(false);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,8 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
||||||
if (month.length() > 1) {
|
if (month.length() > 1) {
|
||||||
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
||||||
}
|
}
|
||||||
String day = new SimpleDateFormat("dd", Locale.getDefault()).format(date);
|
month = month.replaceAll("\\.", "");
|
||||||
|
String day = new SimpleDateFormat("d", Locale.getDefault()).format(date);
|
||||||
descr = month + " " + day;
|
descr = month + " " + day;
|
||||||
}
|
}
|
||||||
holder.description.setText(descr);
|
holder.description.setText(descr);
|
||||||
|
|
|
@ -237,7 +237,8 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
||||||
if (month.length() > 1) {
|
if (month.length() > 1) {
|
||||||
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
||||||
}
|
}
|
||||||
String day = new SimpleDateFormat("dd", Locale.getDefault()).format(date);
|
month = month.replaceAll("\\.", "");
|
||||||
|
String day = new SimpleDateFormat("d", Locale.getDefault()).format(date);
|
||||||
itemViewHolder.description.setText(app.getString(R.string.passed, month + " " + day));
|
itemViewHolder.description.setText(app.getString(R.string.passed, month + " " + day));
|
||||||
} else {
|
} else {
|
||||||
itemViewHolder.point.setVisibility(View.GONE);
|
itemViewHolder.point.setVisibility(View.GONE);
|
||||||
|
|
|
@ -129,7 +129,8 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
||||||
if (month.length() > 1) {
|
if (month.length() > 1) {
|
||||||
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
month = Character.toUpperCase(month.charAt(0)) + month.substring(1);
|
||||||
}
|
}
|
||||||
String day = new SimpleDateFormat("dd", Locale.getDefault()).format(date);
|
month = month.replaceAll("\\.", "");
|
||||||
|
String day = new SimpleDateFormat("d", Locale.getDefault()).format(date);
|
||||||
String desc = app.getString(R.string.passed, month + " " + day);
|
String desc = app.getString(R.string.passed, month + " " + day);
|
||||||
String markerGroupName = marker.groupName;
|
String markerGroupName = marker.groupName;
|
||||||
if (markerGroupName != null) {
|
if (markerGroupName != null) {
|
||||||
|
|
Loading…
Reference in a new issue