Switch some hard-coded strings from android:text to tools:text

Hard-coded as they’re always replaced at runtime, so better to have
them as tools:text
This commit is contained in:
Jonathan Caryl 2017-08-12 22:17:00 +01:00
parent a13231c8b3
commit 17e9f5221f
7 changed files with 30 additions and 21 deletions

View File

@ -2,6 +2,7 @@
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/event_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -98,7 +99,7 @@
android:paddingEnd="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="January 1 1970"
tools:text="January 1 1970"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -110,7 +111,7 @@
android:layout_below="@+id/event_time_image"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:text="00:00"
tools:text="00:00"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -125,7 +126,7 @@
android:paddingEnd="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="January 1 1970"
tools:text="January 1 1970"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -137,7 +138,7 @@
android:layout_below="@+id/event_start_time"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:text="00:00"
tools:text="00:00"
android:textSize="@dimen/day_text_size"/>
<ImageView

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/dialog_repeat_type_picker_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -25,7 +26,7 @@
android:layout_marginStart="@dimen/repeat_type_margin_start"
android:paddingBottom="@dimen/normal_margin"
android:paddingTop="@dimen/medium_margin"
android:text="January 1 1970"/>
tools:text="January 1 1970"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/repeat_type_x_times"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/event_item_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -18,7 +19,7 @@
android:id="@+id/event_item_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13:00"
tools:text="13:00"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -26,7 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/event_item_start"
android:text="15:00"
tools:text="15:00"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -38,7 +39,7 @@
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="@dimen/activity_margin"
android:text="Event title"
tools:text="Event title"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -52,7 +53,7 @@
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="@dimen/activity_margin"
android:text="Event description"
tools:text="Event description"
android:textSize="@dimen/day_text_size"/>
</RelativeLayout>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/event_item_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -21,7 +22,7 @@
android:id="@+id/event_item_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13:00"
tools:text="13:00"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -29,7 +30,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/event_item_start"
android:text="15:00"
tools:text="15:00"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -40,7 +41,7 @@
android:layout_toRightOf="@+id/event_item_start"
android:ellipsize="end"
android:maxLines="1"
android:text="Event title"
tools:text="Event title"
android:textSize="@dimen/day_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
@ -53,7 +54,7 @@
android:alpha=".4"
android:ellipsize="end"
android:maxLines="1"
android:text="Event description"
tools:text="Event description"
android:textSize="@dimen/day_text_size"/>
</RelativeLayout>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/event_item_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -10,7 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:text="13:00"
tools:text="13:00"
android:textSize="@dimen/day_text_size"/>
<TextView
@ -19,7 +20,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/event_item_start"
android:layout_marginLeft="@dimen/activity_margin"
android:text="15:00"
tools:text="15:00"
android:textSize="@dimen/day_text_size"/>
<TextView
@ -31,7 +32,7 @@
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="@dimen/activity_margin"
android:text="Event title"
tools:text="Event title"
android:textSize="@dimen/day_text_size"/>
<TextView
@ -45,7 +46,7 @@
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="@dimen/activity_margin"
android:text="Event description"
tools:text="Event description"
android:textSize="@dimen/day_text_size"/>
</RelativeLayout>

View File

@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:layout_weight="1"
android:orientation="horizontal">
@ -12,8 +13,9 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="#"
android:visibility="gone"/>
tools:text="#"
android:visibility="gone"
tools:visibility="visible"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/label_0"

View File

@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:layout_weight="1"
android:orientation="horizontal">
@ -12,8 +13,9 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="#"
android:visibility="gone"/>
tools:text="#"
android:visibility="gone"
tools:visibility="visible"/>
<TextView
android:id="@+id/label_0"