From 078b41f2abf49e4ca9cc87fe2dea46ee4c39f275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredd=20Badilla=20V=C3=ADquez?= Date: Wed, 18 Dec 2024 20:20:20 -0600 Subject: [PATCH] Solving issue #347 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The problem reported on the issue was wrong, all works good, the text doesn´t seen well, but it has a scrollbar to solve the problem, but when i was testing that i saw that the component on the trackmanager were loking bad and this in the available layouts section too, so i fixed that. First, to the trackmaneger i put a line to the date or name to see text in a uniform way and separate the waypoints and trackpoints counter in two lines, this with the objetive of a friendly interface. Second, to the available layouts, i put a scroll bar and the same adjust to the text that i used in the track manager, to see text in a properly way. --- .../osmtracker/activity/AvailableLayouts.java | 5 +- .../main/res/layout-iw/waypointlist_item.xml | 2 - app/src/main/res/layout/available_layouts.xml | 17 +-- app/src/main/res/layout/tracklist_item.xml | 104 +++++++++++------- app/src/main/res/values/values.xml | 2 +- 5 files changed, 76 insertions(+), 54 deletions(-) diff --git a/app/src/main/java/net/osmtracker/activity/AvailableLayouts.java b/app/src/main/java/net/osmtracker/activity/AvailableLayouts.java index 30553259f..36b99b203 100644 --- a/app/src/main/java/net/osmtracker/activity/AvailableLayouts.java +++ b/app/src/main/java/net/osmtracker/activity/AvailableLayouts.java @@ -151,10 +151,11 @@ public void setAvailableLayouts(List options) { Button layoutButton = new Button(this); layoutButton.setHeight(150); layoutButton.setText(CustomLayoutsUtils.convertFileName(option)); - layoutButton.setTextSize((float)22 ); + layoutButton.setTextSize(16f); layoutButton.setTextColor(Color.WHITE); + layoutButton.setSingleLine(false); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); - layoutParams.setMargins(110, 0, 110, 0); + layoutParams.setMargins(50, 10, 50, 10); layoutButton.setLayoutParams(layoutParams); layoutButton.setPadding(10,20,10,20); layoutButton.setOnClickListener(listener); diff --git a/app/src/main/res/layout-iw/waypointlist_item.xml b/app/src/main/res/layout-iw/waypointlist_item.xml index 953fc6650..692226d2c 100644 --- a/app/src/main/res/layout-iw/waypointlist_item.xml +++ b/app/src/main/res/layout-iw/waypointlist_item.xml @@ -5,6 +5,4 @@ - - diff --git a/app/src/main/res/layout/available_layouts.xml b/app/src/main/res/layout/available_layouts.xml index 3a6d16c14..540744ee4 100644 --- a/app/src/main/res/layout/available_layouts.xml +++ b/app/src/main/res/layout/available_layouts.xml @@ -1,9 +1,12 @@ - - + android:fillViewport="true"> - - \ No newline at end of file + + diff --git a/app/src/main/res/layout/tracklist_item.xml b/app/src/main/res/layout/tracklist_item.xml index 4308c5aeb..c173862d6 100644 --- a/app/src/main/res/layout/tracklist_item.xml +++ b/app/src/main/res/layout/tracklist_item.xml @@ -41,53 +41,73 @@ style="@android:style/TextAppearance.Large" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:autoSizeTextType="uniform" + android:maxLines="1" android:text="{start_date}" /> - + - + - + + - + + + + + + + diff --git a/app/src/main/res/values/values.xml b/app/src/main/res/values/values.xml index 91590768b..e34d0695d 100644 --- a/app/src/main/res/values/values.xml +++ b/app/src/main/res/values/values.xml @@ -3,5 +3,5 @@ https://github.com/labexp/osmtracker-android https://www.transifex.com/projects/p/osmtracker-android/ - +