First Commit

This commit is contained in:
Tommaso Berlose
2017-10-06 18:13:30 +02:00
commit 13ba1e3281
116 changed files with 1973 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners
android:radius="3dp" />
<stroke
android:color="@android:color/white"
android:width="2dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid
android:color="@color/black_30" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners
android:radius="3dp" />
<solid
android:color="@color/black_30"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:angle="90"
android:startColor="@color/colorNightDark"
android:endColor="@color/colorPrimary"
android:type="linear" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="108.0"
android:viewportWidth="108.0">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#66FFFFFF"
android:strokeWidth="0.8" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<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:background="@drawable/gradient_background"
android:orientation="vertical"
tools:context="com.tommasoberlose.anotherwidget.ui.activity.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="48dp"
android:layout_marginLeft="48dp"
android:layout_marginRight="48dp"
android:id="@+id/toolbar"
android:layout_centerHorizontal="true"
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/app_name"
android:gravity="center_vertical"
style="@style/AnotherWidget.Main.Title"
android:textAllCaps="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:layout_below="@+id/toolbar"
android:gravity="center"
android:layout_above="@+id/menu_container"
android:id="@+id/all_set_container">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Title"
android:gravity="start"
android:textStyle="bold"
android:text="@string/all_set_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Description"
android:alpha="0.9"
android:fontFamily="sans-serif"
android:text="@string/all_set_subtitle"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Button.Dark"
android:id="@+id/action_github"
android:layout_marginTop="16dp"
android:layout_gravity="center_horizontal"
android:text="@string/all_set_btn"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"
android:id="@+id/no_calendar_permission_container"
android:orientation="vertical">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="14dp"
android:tint="@android:color/white"
android:background="@drawable/circle_background"
android:src="@drawable/ic_action_calendar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Title"
android:paddingTop="16dp"
android:paddingRight="32dp"
android:paddingLeft="32dp"
android:text="@string/title_permission_calendar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Description"
android:paddingBottom="32dp"
android:paddingRight="32dp"
android:paddingLeft="32dp"
android:text="@string/description_permission_calendar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Button"
android:id="@+id/request_calendar"
android:text="@string/button_request_permission"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/no_location_permission_container"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="14dp"
android:tint="@android:color/white"
android:background="@drawable/circle_background"
android:src="@drawable/ic_action_location"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Title"
android:paddingTop="16dp"
android:paddingRight="32dp"
android:paddingLeft="32dp"
android:text="@string/title_permission_location"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Description"
android:paddingBottom="32dp"
android:paddingRight="32dp"
android:paddingLeft="32dp"
android:text="@string/description_permission_location"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Main.Button"
android:id="@+id/request_location"
android:text="@string/button_request_permission"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:baselineAligned="false"
android:id="@+id/menu_container"
android:background="@color/black_10"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:id="@+id/action_share"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="2dp"
android:layout_marginTop="8dp"
android:src="@drawable/ic_action_share"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_share"
style="@style/AnotherWidget.Main.Button.TabBar"
android:background="@android:color/transparent"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:id="@+id/action_rate"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="2dp"
android:layout_marginTop="8dp"
android:src="@drawable/ic_action_rate"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_rate"
style="@style/AnotherWidget.Main.Button.TabBar"
android:background="@android:color/transparent"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:id="@+id/action_support"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="2dp"
android:layout_marginTop="8dp"
android:src="@drawable/ic_action_gift"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_support"
style="@style/AnotherWidget.Main.Button.TabBar"
android:background="@android:color/transparent"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,106 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main_layout">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal"
android:id="@+id/empty_layout">
<TextView
android:id="@+id/empty_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
style="@style/AnotherWidget.Title" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/weather"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/divider"
style="@style/AnotherWidget.Subtitle"/>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:id="@+id/empty_weather_icon"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:src="@drawable/clear_night"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Date.Big"
android:id="@+id/temp"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical"
android:visibility="gone"
android:id="@+id/calendar_layout"
android:gravity="center">
<TextView
android:id="@+id/next_event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Title" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginTop="1dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp"
android:src="@drawable/ic_action_calendar"/>
<TextView
android:id="@+id/next_event_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Subtitle" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/calendar_weather">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/divider"
style="@style/AnotherWidget.Subtitle"/>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:id="@+id/weather_icon"
android:src="@drawable/clear_night"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Date"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:id="@+id/calendar_temp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="|"
style="@style/AnotherWidget.Subtitle"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Date"
android:id="@+id/temp"/>
</LinearLayout>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/gradient_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/gradient_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#0092ca</color>
<color name="colorPrimaryDark">#0083B5</color>
<color name="colorNightDark">#124E96</color>
<color name="colorAccent">#FF008E</color>
<color name="colorPrimaryLight">#DAEAF6</color>
<color name="black_50">#80000000</color>
<color name="black_30">#48000000</color>
<color name="black_10">#1A000000</color>
<color name="white_80">#CCFFFFFF</color>
</resources>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Refer to App Widget Documentation for margin information
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
-->
<dimen name="widget_margin">16dp</dimen>
</resources>

View File

@ -0,0 +1,19 @@
<resources>
<string name="app_name">Another Widget</string>
<string name="add_widget">Add Another Widget</string>
<string name="main_pre_title">Just</string>
<string name="button_request_permission">Grant Permission</string>
<string name="title_permission_calendar">See your Events</string>
<string name="title_permission_location">Control the Weather</string>
<string name="description_permission_calendar">Grant access to your calendar\nto view events in your widget.</string>
<string name="description_permission_location">Grant access to your location\nto view weather in your widget.</string>
<string name="notification_title">Get more from your widget</string>
<string name="notification_subtitle">View your events and the weather in another widget.</string>
<string name="divider">|</string>
<string name="action_share">Share</string>
<string name="action_rate">Rate</string>
<string name="action_support">Support</string>
<string name="all_set_title">Good Job!</string>
<string name="all_set_subtitle">You have completed the configuration.\nWatch out for updates.</string>
<string name="all_set_btn">Stay up to date</string>
</resources>

View File

@ -0,0 +1,91 @@
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AnotherWidget.Main.Title" parent="TextAppearance.AppCompat.Medium">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">28sp</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:gravity">center</item>
<item name="android:textStyle">bold</item>
</style>
<style name="AnotherWidget.Main.Subtitle" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">20sp</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:gravity">center</item>
</style>
<style name="AnotherWidget.Main.Description" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">18sp</item>
<item name="android:gravity">center</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:alpha">0.6</item>
</style>
<style name="AnotherWidget.Main.Button" parent="TextAppearance.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="android:gravity">center</item>
<item name="android:padding">8dp</item>
<item name="android:background">@drawable/card_background</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
</style>
<style name="AnotherWidget.Main.Button.Dark" parent="TextAppearance.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="android:gravity">center</item>
<item name="android:padding">8dp</item>
<item name="android:background">@drawable/dark_card_background</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
<item name="android:textSize">12sp</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
</style>
<style name="AnotherWidget.Main.Button.TabBar" parent="TextAppearance.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="android:gravity">center</item>
<item name="android:padding">8dp</item>
<item name="android:textSize">12sp</item>
</style>
<style name="AnotherWidget.Title" parent="TextAppearance.AppCompat.Medium">
<item name="android:textColor">@android:color/white</item>
<item name="android:padding">4dp</item>
<item name="android:textSize">26sp</item>
<item name="android:shadowColor">@color/black_50</item>
<item name="android:shadowRadius">5</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:gravity">center</item>
<item name="android:textStyle">bold</item>
</style>
<style name="AnotherWidget.Subtitle" parent="TextAppearance.AppCompat.Small">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">16sp</item>
<item name="android:shadowColor">@color/black_50</item>
<item name="android:shadowRadius">5</item>
<item name="android:gravity">center</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="AnotherWidget.Date" parent="AnotherWidget.Subtitle">
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:textStyle">bold</item>
</style>
<style name="AnotherWidget.Date.Big" parent="AnotherWidget.Title">
<item name="android:textSize">24sp</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:textStyle">bold</item>
</style>
</resources>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialKeyguardLayout="@layout/the_widget"
android:initialLayout="@layout/the_widget"
android:minHeight="40dp"
android:minWidth="250dp"
android:previewImage="@drawable/example_appwidget_preview"
android:resizeMode="horizontal"
android:updatePeriodMillis="86400000"
android:widgetCategory="home_screen"></appwidget-provider>