Skip to content

Commit

Permalink
Extracted dimens and colors to resource files.
Browse files Browse the repository at this point in the history
Updated version.
  • Loading branch information
shliama committed Jan 29, 2016
1 parent 06cba2d commit 757bef0
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 38 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha7'
classpath 'com.android.tools.build:gradle:2.0.0-alpha8'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.1.1
VERSION_CODE=4
VERSION_NAME=1.1.2
VERSION_CODE=5
GROUP=com.yalantis

POM_DESCRIPTION=Android Library for cropping images
Expand Down
4 changes: 2 additions & 2 deletions ucrop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 10
targetSdkVersion 23
versionCode 4
versionName "1.1.1"
versionCode 5
versionName "1.1.2"
}
buildTypes {
release {
Expand Down
4 changes: 2 additions & 2 deletions ucrop/src/main/res/color/ucrop_scale_text_view_selector.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="@color/ucrop_color_widget_active" />
<item android:color="@android:color/black" />
<item android:color="@color/ucrop_color_widget_active" android:state_selected="true"/>
<item android:color="@color/ucrop_color_widget"/>
</selector>
10 changes: 5 additions & 5 deletions ucrop/src/main/res/layout/ucrop_activity_photobox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/ucrop_label_edit_photo"
android:textColor="@android:color/white"/>
android:textColor="@color/ucrop_color_title"/>

</android.support.v7.widget.Toolbar>

Expand All @@ -26,12 +26,12 @@
android:layout_height="match_parent"
android:layout_above="@+id/wrapper_controls"
android:layout_below="@+id/toolbar"
android:background="@android:color/black"/>
android:background="@color/ucrop_color_crop_background"/>

<FrameLayout
android:id="@+id/wrapper_controls"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_height="@dimen/ucrop_height_wrapper_controls"
android:layout_above="@+id/wrapper_states"
android:background="@color/ucrop_color_widget_background">

Expand All @@ -51,14 +51,14 @@

<ImageView
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_height="@dimen/ucrop_height_divider_shadow"
android:layout_above="@+id/wrapper_states"
android:background="@drawable/ucrop_shadow_upside"/>

<LinearLayout
android:id="@+id/wrapper_states"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_height="@dimen/ucrop_height_wrapper_states"
android:layout_alignParentBottom="true"
android:background="@color/ucrop_color_widget_background"
android:baselineAligned="false"
Expand Down
14 changes: 4 additions & 10 deletions ucrop/src/main/res/layout/ucrop_layout_rotate_wheel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@

<TextView
android:id="@+id/text_view_rotate"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="13sp"
style="@style/ucrop_TextViewWidgetText"
tools:text="100°"/>

<com.yalantis.ucrop.view.widget.HorizontalProgressWheelView
android:id="@+id/rotate_scroll_wheel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/wrapper_reset_rotate"
android:layout_below="@+id/text_view_rotate"
android:layout_toEndOf="@+id/wrapper_reset_rotate"
android:layout_toLeftOf="@+id/wrapper_rotate_by_angle"
android:layout_toStartOf="@+id/wrapper_rotate_by_angle"
android:layout_below="@+id/text_view_rotate"/>
android:layout_toRightOf="@+id/wrapper_reset_rotate"
android:layout_toStartOf="@+id/wrapper_rotate_by_angle"/>

<FrameLayout
android:id="@+id/wrapper_reset_rotate"
Expand Down
8 changes: 1 addition & 7 deletions ucrop/src/main/res/layout/ucrop_layout_scale_wheel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@

<TextView
android:id="@+id/text_view_scale"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="13sp"
style="@style/ucrop_TextViewWidgetText"
tools:text="100%"/>

<com.yalantis.ucrop.view.widget.HorizontalProgressWheelView
Expand Down
3 changes: 3 additions & 0 deletions ucrop/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
<color name="ucrop_color_toolbar">#FF6E40</color>
<color name="ucrop_color_statusbar">#CC5833</color>
<color name="ucrop_color_title">#fff</color>
<color name="ucrop_color_widget">#000</color>
<color name="ucrop_color_widget_active">#FF6E40</color>
<color name="ucrop_color_widget_background">#fff</color>
<color name="ucrop_color_widget_text">#000</color>
<color name="ucrop_color_progress_wheel_line">#808080</color>
<color name="ucrop_color_crop_background">#000</color>

<!--Crop View-->
<color name="ucrop_color_default_crop_grid">#ffffff</color>
Expand Down
19 changes: 13 additions & 6 deletions ucrop/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<resources>

<dimen name="ucrop_default_crop_grid_stoke_width">1dp</dimen>
<dimen name="ucrop_default_crop_frame_stoke_width">1dp</dimen>

<dimen name="ucrop_size_dot_scale_text_view">8dp</dimen>

<!--uCrop Activity-->
<dimen name="ucrop_padding_crop_frame">16dp</dimen>

<dimen name="ucrop_size_dot_scale_text_view">8dp</dimen>
<dimen name="ucrop_height_horizontal_wheel_progress_line">20dp</dimen>
<dimen name="ucrop_width_horizontal_wheel_progress_line">2dp</dimen>
<dimen name="ucrop_margin_horizontal_wheel_progress_line">10dp</dimen>
<dimen name="ucrop_height_wrapper_controls">64dp</dimen>
<dimen name="ucrop_height_wrapper_states">72dp</dimen>
<dimen name="ucrop_height_divider_shadow">3dp</dimen>
<dimen name="ucrop_text_size_widget_text">13sp</dimen>
<dimen name="ucrop_margit_top_widget_text">10sp</dimen>
<dimen name="ucrop_size_wrapper_rotate_button">50dp</dimen>
<dimen name="ucrop_height_crop_aspect_ratio_text">40dp</dimen>

<!--Crop View-->
<dimen name="ucrop_default_crop_grid_stoke_width">1dp</dimen>
<dimen name="ucrop_default_crop_frame_stoke_width">1dp</dimen>

</resources>
15 changes: 12 additions & 3 deletions ucrop/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,27 @@
</style>

<style name="ucrop_WrapperRotateButton">
<item name="android:layout_width">50dp</item>
<item name="android:layout_height">50dp</item>
<item name="android:layout_width">@dimen/ucrop_size_wrapper_rotate_button</item>
<item name="android:layout_height">@dimen/ucrop_size_wrapper_rotate_button</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:clickable">true</item>
</style>

<style name="ucrop_TextViewCropAspectRatio">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">40dp</item>
<item name="android:layout_height">@dimen/ucrop_height_crop_aspect_ratio_text</item>
<item name="android:layout_gravity">center</item>
<item name="android:duplicateParentState">true</item>
<item name="android:textColor">@color/ucrop_scale_text_view_selector</item>
</style>

<style name="ucrop_TextViewWidgetText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_marginTop">@dimen/ucrop_margit_top_widget_text</item>
<item name="android:textColor">@color/ucrop_color_widget_text</item>
<item name="android:textSize">@dimen/ucrop_text_size_widget_text</item>
</style>

</resources>

0 comments on commit 757bef0

Please sign in to comment.