Multiple changes and fixes

This commit is contained in:
Tommaso Berlose
2017-10-13 18:28:45 +02:00
parent f7e99184c9
commit 4d80c53b67
85 changed files with 903 additions and 347 deletions

View File

@ -0,0 +1,31 @@
<?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"
tools:context="com.tommasoberlose.anotherwidget.ui.activity.CustomLocationActivity">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:padding="8dp"
app:cardCornerRadius="0dp"
android:id="@+id/toolbar"
android:background="@android:color/white">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:padding="16dp"
android:inputType="textCapWords"
android:id="@+id/location"
android:gravity="center_vertical"
android:hint="@string/settings_custom_location_title"/>
</android.support.v7.widget.CardView>
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list_view"
android:layout_below="@+id/toolbar" />
</RelativeLayout>

View File

@ -59,14 +59,63 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="20dp"
android:paddingBottom="20dp">
android:paddingTop="8dp"
android:paddingBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/settings_calendar_title"
android:visibility="gone"
style="@style/AnotherWidget.Settings.Header"/>
<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_date_format"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_date_format_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/date_format_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_hour_format"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_hour_format_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/hour_format_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -115,13 +164,46 @@
android:id="@+id/all_day_label"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/black_10"
android:alpha="0.5"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_weather_title"
android:visibility="gone"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
style="@style/AnotherWidget.Settings.Header"/>
<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_location"
android:visibility="gone"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_custom_location_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/label_custom_location"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -146,6 +228,30 @@
android:id="@+id/temp_unit"
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_weather_refresh_period"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AnotherWidget.Settings.Title"
android:text="@string/settings_weather_refresh_period_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/label_weather_refresh_period"
style="@style/AnotherWidget.Settings.Subtitle"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:gravity="center_vertical"
android:padding="16dp"
style="@style/AnotherWidget.Settings.Title"/>

View File

@ -1,6 +1,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout">
<LinearLayout
android:layout_width="match_parent"
@ -13,6 +14,8 @@
android:id="@+id/empty_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:maxLines="1"
style="@style/AnotherWidget.Title" />
<LinearLayout
android:orientation="horizontal"
@ -20,6 +23,7 @@
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/weather"
android:minWidth="110dp"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
@ -29,8 +33,8 @@
android:text="@string/divider"
style="@style/AnotherWidget.Subtitle"/>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:id="@+id/empty_weather_icon"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"/>
@ -83,6 +87,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="2dp"
android:text="@string/divider"
style="@style/AnotherWidget.Subtitle"/>
<ImageView