add optional text shadow to widget for better readability

This commit is contained in:
tibbi
2018-03-12 00:01:20 +01:00
parent 3b5bf64066
commit c1feb66b91
11 changed files with 116 additions and 2 deletions

View File

@ -369,5 +369,45 @@
android:clickable="false"/>
</RelativeLayout>
<View
android:id="@+id/widgets_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/widgets_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bigger_margin"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/widgets"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size"/>
<RelativeLayout
android:id="@+id/settings_use_text_shadow_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_text_shadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_text_shadow"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,35 @@
<?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/widget_date_time_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/widget_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:includeFontPadding="false"
android:shadowColor="@android:color/black"
android:shadowDy="1"
android:shadowRadius="1"
android:textSize="@dimen/widget_time_text_size"
tools:text="00:00"/>
<TextView
android:id="@+id/widget_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/widget_time"
android:gravity="center_horizontal"
android:includeFontPadding="false"
android:paddingBottom="@dimen/normal_margin"
android:shadowColor="@android:color/black"
android:shadowDy="1"
android:shadowRadius="1"
android:textSize="@dimen/normal_text_size"
tools:text="Mon, 1 January"/>
</RelativeLayout>