reuse color and dimen values from commons

This commit is contained in:
tibbi 2017-04-08 17:27:47 +02:00
parent 96fa329ea5
commit 56f1093b9d
9 changed files with 41 additions and 63 deletions

View File

@ -33,7 +33,7 @@ android {
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.simplemobiletools:commons:2.16.1'
compile 'com.jakewharton:butterknife:8.0.1'
compile 'com.github.yukuku:ambilwarna:2.0.1'

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/about_scrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/about_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
@ -9,10 +9,7 @@
<RelativeLayout
android:id="@+id/about_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin">
android:layout_height="wrap_content">
<TextView
android:id="@+id/about_website"
@ -26,7 +23,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_website"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/email_label"/>
<TextView
@ -34,7 +30,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_email_label"
android:paddingBottom="@dimen/activity_margin"
android:paddingBottom="1dp"
android:text="@string/email"/>
<TextView
@ -42,53 +38,53 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_email"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:text="@string/invite_friends_underlined"
android:textColor="@color/colorPrimary"/>
android:textColor="#ff0000"/>
<TextView
android:id="@+id/about_rate_us"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_invite"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:text="@string/rate_us_underlined"
android:textColor="@color/colorPrimary"/>
android:textColor="#ff0000"/>
<TextView
android:id="@+id/about_license"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_rate_us"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:text="@string/third_party_licences_underlined"
android:textColor="@color/colorPrimary"/>
android:textColor="#ff0000"/>
<TextView
android:id="@+id/about_follow_us"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_license"
android:paddingBottom="@dimen/social_padding"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:text="@string/follow_us"/>
<ImageView
android:id="@+id/about_facebook"
android:layout_width="@dimen/social_logo"
android:layout_height="@dimen/social_logo"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_below="@+id/about_follow_us"
android:src="@mipmap/facebook"/>
<ImageView
android:id="@+id/about_gplus"
android:layout_width="@dimen/social_logo"
android:layout_height="@dimen/social_logo"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_below="@+id/about_follow_us"
android:layout_marginLeft="@dimen/social_padding"
android:layout_marginLeft="8dp"
android:layout_toRightOf="@+id/about_facebook"
android:src="@mipmap/gplus"/>
@ -99,7 +95,7 @@
android:layout_alignParentBottom="true"
android:layout_below="@+id/about_gplus"
android:gravity="center_horizontal|bottom"
android:paddingTop="@dimen/activity_margin"
android:paddingTop="16dp"
android:text="v1.0\nCopyright © Simple Mobile Tools 2016"/>
</RelativeLayout>
</ScrollView>

View File

@ -23,7 +23,7 @@
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_margin"
android:text="@string/butterknife_title"
android:textColor="@color/colorPrimary"/>
android:textColor="@color/color_primary"/>
<TextView
android:id="@+id/license_butterknife_text"
@ -37,7 +37,7 @@
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_margin"
android:text="@string/ambilwarna_title"
android:textColor="@color/colorPrimary"/>
android:textColor="@color/color_primary"/>
<TextView
android:id="@+id/license_ambilwarna_text"

View File

@ -12,17 +12,17 @@
<ImageView
android:id="@+id/color_picker"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/undo"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_alignParentRight="true"
android:layout_below="@id/color_picker"
android:padding="@dimen/icon_padding"
android:padding="@dimen/medium_margin"
android:src="@mipmap/undo_black"
android:visibility="gone"/>
@ -34,7 +34,7 @@
android:layout_centerHorizontal="true"
android:layout_marginBottom="12dp"
android:max="75"
android:padding="@dimen/icon_padding"
android:padding="@dimen/medium_margin"
android:progress="5"
android:visibility="gone"/>

View File

@ -15,7 +15,7 @@
android:id="@+id/settings_dark_theme_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_padding"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin">
@ -24,7 +24,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/settings_padding"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/dark_theme"/>
<android.support.v7.widget.SwitchCompat
@ -41,7 +41,7 @@
android:id="@+id/settings_brush_size_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_padding"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin">
@ -50,7 +50,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/settings_padding"
android:paddingLeft="@dimen/medium_margin"
android:text="@string/brush_size"/>
<android.support.v7.widget.SwitchCompat

View File

@ -1,8 +0,0 @@
<resources>
<dimen name="icon_size">48dp</dimen>
<dimen name="icon_padding">8dp</dimen>
<dimen name="social_padding">12dp</dimen>
<dimen name="social_logo">50dp</dimen>
<dimen name="normal_text_size">18sp</dimen>
</resources>

View File

@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#fff68630</color>
<color name="colorPrimaryDark">#ffe27725</color>
<color name="colorAccent">@color/colorPrimary</color>
</resources>

View File

@ -1,13 +1,5 @@
<resources>
<dimen name="activity_margin">16dp</dimen>
<dimen name="icon_size">48dp</dimen>
<dimen name="icon_padding">8dp</dimen>
<dimen name="social_padding">8dp</dimen>
<dimen name="social_logo">40dp</dimen>
<dimen name="settings_padding">8dp</dimen>
<dimen name="stroke_bar_size">150dp</dimen>
<dimen name="preview_dot_stroke_size">1dp</dimen>
<dimen name="preview_dot_offset_y">70dp</dimen>
<dimen name="normal_text_size">14sp</dimen>
</resources>

View File

@ -1,24 +1,24 @@
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
<item name="android:textSize">@dimen/normal_text_size</item>
</style>
<style name="AppTheme.Dark" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
<item name="android:textSize">@dimen/normal_text_size</item>
<item name="android:windowBackground">@android:color/black</item>
</style>
<style name="AppTheme.ActionBarStyle" parent="@style/Base.Widget.AppCompat.ActionBar">
<item name="background">@color/colorPrimary</item>
<item name="background">@color/color_primary</item>
<item name="titleTextStyle">@style/AppTheme.ActionBar.TitleTextStyle</item>
</style>