Text Shadow, Clock, Product Sans Font, Multiple Events and more

This commit is contained in:
Tommaso Berlose
2017-11-05 22:06:39 +01:00
parent fde3fdfab1
commit 748249fed5
45 changed files with 1101 additions and 224 deletions

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/gradient_background"
tools:context="com.tommasoberlose.anotherwidget.ui.activity.ChooseApplicationActivity">
<LinearLayout
@ -37,6 +36,8 @@
android:layout_height="wrap_content"
android:padding="8dp"
app:cardCornerRadius="3dp"
android:layout_below="@+id/toolbar"
android:layout_above="@+id/bottom_buttons"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
@ -66,9 +67,8 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="12dp"
android:contentDescription="@string/custom_location_gps"
android:id="@+id/action_default"
android:src="@drawable/ic_action_reset"
android:id="@+id/action_back"
android:src="@drawable/ic_action_close"
android:tint="@android:color/black"/>
</LinearLayout>
<LinearLayout
@ -81,4 +81,37 @@
android:id="@+id/list_view" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="3dp"
android:id="@+id/bottom_buttons"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:layout_alignParentBottom="true"
android:background="@android:color/white"
app:cardBackgroundColor="@android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="?android:attr/actionBarSize"
android:text="@string/action_default"
android:id="@+id/action_default"
android:textColor="@android:color/black"
style="@style/AnotherWidget.Main.Button"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="?android:attr/actionBarSize"
android:text="@string/action_none"
android:id="@+id/action_none"
android:textColor="@android:color/black"
style="@style/AnotherWidget.Main.Button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@ -153,6 +153,30 @@
android:id="@+id/font_color_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:clickable="true"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:id="@+id/action_custom_font"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_custom_font_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/custom_font_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -469,6 +493,30 @@
android:id="@+id/show_until_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:clickable="true"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:id="@+id/action_show_multiple_events"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_show_multiple_events_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/show_multiple_events_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -0,0 +1,368 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradient_background"
android:orientation="vertical"
tools:context="com.tommasoberlose.anotherwidget.ui.activity.SupportDevActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="32dp"
android:id="@+id/toolbar"
android:gravity="center_vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/main_pre_title"
android:alpha="0.6"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_vertical"
style="@style/AnotherWidget.Main.Subtitle"
android:textAllCaps="true"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_custom_app_name"
android:gravity="center_vertical"
style="@style/AnotherWidget.Main.Title"
android:textAllCaps="true"/>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="3dp"
android:id="@+id/products_card"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:background="@android:color/white"
app:cardBackgroundColor="@android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
android:src="@drawable/ic_action_gift"
android:tint="@color/dark_grey"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_main_title"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-medium"
android:padding="8dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="4dp"
android:textAppearance="?android:textAppearanceListItem"/>
</LinearLayout>
</LinearLayout>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/loader"
android:layout_margin="16dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/products_list"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:visibility="gone"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:id="@+id/action_donation_coffee"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/donation_coffee"
android:paddingRight="8dp"
android:paddingLeft="40dp"
android:textColor="@color/dark_grey"
android:textAppearance="?android:textAppearanceButton"/>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black_10"
app:cardPreventCornerOverlap="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/black_50"
android:id="@+id/import_donation_coffee"
android:textSize="12sp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:id="@+id/action_donation_donuts"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/donation_donuts"
android:paddingRight="8dp"
android:paddingLeft="40dp"
android:textColor="@color/dark_grey"
android:textAppearance="?android:textAppearanceButton"/>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black_10"
app:cardPreventCornerOverlap="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/black_50"
android:id="@+id/import_donation_donuts"
android:textSize="12sp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:id="@+id/action_donation_breakfast"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/donation_breakfast"
android:paddingRight="8dp"
android:paddingLeft="40dp"
android:textColor="@color/dark_grey"
android:textAppearance="?android:textAppearanceButton"/>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black_10"
app:cardPreventCornerOverlap="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/black_50"
android:id="@+id/import_donation_breakfast"
android:textSize="12sp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:id="@+id/action_donation_lunch"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/donation_lunch"
android:paddingRight="8dp"
android:paddingLeft="40dp"
android:textColor="@color/dark_grey"
android:textAppearance="?android:textAppearanceButton"/>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black_10"
app:cardPreventCornerOverlap="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/black_50"
android:id="@+id/import_donation_lunch"
android:textSize="12sp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:id="@+id/action_donation_dinner"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/donation_dinner"
android:paddingRight="8dp"
android:paddingLeft="40dp"
android:textColor="@color/dark_grey"
android:textAppearance="?android:textAppearanceButton"/>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black_10"
app:cardPreventCornerOverlap="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/black_50"
android:id="@+id/import_donation_dinner"
android:textSize="12sp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="3dp"
android:id="@+id/action_translate"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:background="@android:color/white"
app:cardBackgroundColor="@android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="8dp"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
android:src="@drawable/ic_action_translate"
android:tint="@color/dark_grey"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_translations_title"
android:textColor="@color/dark_grey"
style="@style/AnotherWidget.Settings.Title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_translations_subtitle"
android:textColor="@android:color/black"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="3dp"
android:id="@+id/action_website"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:background="@android:color/white"
app:cardBackgroundColor="@android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="8dp"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
android:src="@drawable/ic_action_dev"
android:tint="@color/dark_grey"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_website_title"
android:textColor="@color/dark_grey"
style="@style/AnotherWidget.Settings.Title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/support_website_subtitle"
android:textColor="@android:color/black"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@ -123,7 +123,6 @@
android:clickable="true"
android:focusable="true"
android:padding="16dp"
android:visibility="gone"
android:id="@+id/action_support"
android:orientation="horizontal">
<ImageView

View File

@ -7,9 +7,9 @@
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-16dp"
android:layout_centerHorizontal="true"
android:gravity="center"
android:layout_marginTop="-16dp"
android:lineSpacingMultiplier="1"
android:lineSpacingExtra="0dp"
android:visibility="gone"
@ -21,16 +21,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="-8dp"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_below="@+id/time"
android:orientation="horizontal"
android:id="@+id/empty_layout">
<TextView
android:id="@+id/empty_date"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:lines="1"
android:maxLines="1"
android:gravity="right"
@ -72,7 +70,6 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
android:layout_marginTop="-8dp"
android:layout_centerHorizontal="true"
android:layout_below="@+id/time"
android:id="@+id/calendar_layout"
@ -84,19 +81,24 @@
<TextView
android:id="@+id/next_event"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_weight="1"
android:maxLines="1"
android:lines="1"
android:gravity="end"
android:gravity="right"
android:ellipsize="end"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Title" />
<TextView
android:id="@+id/next_event_difference_time"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
style="@style/AnotherWidget.Title" />
android:gravity="center">
<TextView
android:id="@+id/next_event_difference_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
style="@style/AnotherWidget.Title" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
@ -125,6 +127,12 @@
android:layout_height="wrap_content"
style="@style/AnotherWidget.Subtitle" />
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginLeft="6dp"
android:id="@+id/multiple_events"
android:src="@drawable/ic_action_next"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
@ -136,7 +144,6 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="2dp"
android:id="@+id/divider2"
android:text="@string/divider"
style="@style/AnotherWidget.Subtitle"/>

View File

@ -6,15 +6,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:scaleType="centerCrop"
android:id="@+id/bitmap_container"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:alpha="0">
<include layout="@layout/the_widget"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/intent_container" />
android:alpha="0"
android:layout_centerInParent="true">
<include layout="@layout/the_widget"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/intent_container" />
</LinearLayout>
</RelativeLayout>