Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/merge non native updates to master #568

Merged
merged 19 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Applied new color schema to uCrop controls
  • Loading branch information
OleksandNekrasov committed Sep 10, 2019
commit 3a93d082b2676217ed9d552d975a0c5cc540da5c
2 changes: 1 addition & 1 deletion ucrop/src/main/java/com/yalantis/ucrop/UCropActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private void setupAspectRatioWidget(@NonNull Intent intent) {
wrapperAspectRatio = (FrameLayout) getLayoutInflater().inflate(R.layout.ucrop_aspect_ratio, null);
wrapperAspectRatio.setLayoutParams(lp);
aspectRatioTextView = ((AspectRatioTextView) wrapperAspectRatio.getChildAt(0));
aspectRatioTextView.setActiveColor(mActiveWidgetColor);
aspectRatioTextView.setActiveColor(mActiveControlsWidgetColor);
aspectRatioTextView.setAspectRatio(aspectRatio);

wrapperAspectRatioList.addView(wrapperAspectRatio);
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:color="@color/ucrop_color_widget_active" android:state_selected="true"/>
<item android:color="@color/ucrop_color_widget"/>
<item android:color="@color/ucrop_color_active_aspect_ratio" android:state_selected="true"/>
<item android:color="@color/ucrop_color_inactive_aspect_ratio"/>
</selector>
3 changes: 2 additions & 1 deletion ucrop/src/main/res/drawable/ucrop_ic_crop.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_active_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFF"
android:fillColor="#000"
android:fillType="evenOdd"
android:pathData="M22,3.25L20.75,2l-4.089,4.016h-8.62L8.041,2L6.005,2v4.016L2,6.016L2,8.03h4.004v9.953h9.997L16.001,22h1.996v-4.018L22,17.982v-1.99h-4.003L17.997,7.326L22,3.25zM8.03,8.02h6.518l-6.519,6.647L8.029,8.019zM9.176,15.99L15.994,9.2v6.791L9.176,15.991z" />
</vector>
4 changes: 2 additions & 2 deletions ucrop/src/main/res/drawable/ucrop_ic_crop_unselected.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_inactive_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillAlpha=".65"
android:fillColor="#FFF"
android:fillColor="#000"
android:fillType="evenOdd"
android:pathData="M22,3.25L20.75,2l-4.089,4.016h-8.62L8.041,2L6.005,2v4.016L2,6.016L2,8.03h4.004v9.953h9.997L16.001,22h1.996v-4.018L22,17.982v-1.99h-4.003L17.997,7.326L22,3.25zM8.03,8.02h6.518l-6.519,6.647L8.029,8.019zM9.176,15.99L15.994,9.2v6.791L9.176,15.991z" />
</vector>
3 changes: 2 additions & 1 deletion ucrop/src/main/res/drawable/ucrop_ic_rotate.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_active_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFF"
android:fillColor="#000"
android:fillType="evenOdd"
android:pathData="M19.761,5.566a10.084,10.084 0,0 0,-2.307 -2.011A10.02,10.02 0,0 0,12.083 2a9.983,9.983 0,0 0,-7.106 2.943,9.983 9.983,0 0,0 -2.943,7.106 9.983,9.983 0,0 0,2.943 7.106,9.983 9.983,0 0,0 7.106,2.943 9.99,9.99 0,0 0,5.732 -1.794,10.034 10.034,0 0,0 3.63,-4.6l-2.284,-0.893a7.553,7.553 0,0 1,-7.078 4.834c-4.189,0 -7.596,-3.408 -7.596,-7.596 0,-4.189 3.407,-7.596 7.596,-7.596 2.12,0 4.08,0.861 5.488,2.338l-2.67,1.493 3.482,2.074 3.482,2.075 0.056,-4.053 0.055,-4.053 -2.215,1.239z" />
</vector>
4 changes: 2 additions & 2 deletions ucrop/src/main/res/drawable/ucrop_ic_rotate_unselected.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_inactive_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillAlpha=".65"
android:fillColor="#FFFF"
android:fillColor="#000"
android:fillType="evenOdd"
android:pathData="M19.761,5.566a10.084,10.084 0,0 0,-2.307 -2.011A10.02,10.02 0,0 0,12.083 2a9.983,9.983 0,0 0,-7.106 2.943,9.983 9.983,0 0,0 -2.943,7.106 9.983,9.983 0,0 0,2.943 7.106,9.983 9.983,0 0,0 7.106,2.943 9.99,9.99 0,0 0,5.732 -1.794,10.034 10.034,0 0,0 3.63,-4.6l-2.284,-0.893a7.553,7.553 0,0 1,-7.078 4.834c-4.189,0 -7.596,-3.408 -7.596,-7.596 0,-4.189 3.407,-7.596 7.596,-7.596 2.12,0 4.08,0.861 5.488,2.338l-2.67,1.493 3.482,2.074 3.482,2.075 0.056,-4.053 0.055,-4.053 -2.215,1.239z" />
</vector>
3 changes: 2 additions & 1 deletion ucrop/src/main/res/drawable/ucrop_ic_scale.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_active_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFF"
android:fillColor="#000"
android:fillType="nonZero"
android:pathData="M8,8v8h8L16,8L8,8zM6,6h12v12L6,18L6,6zM9,2v2L3,4l1,-1v6L2,9L2,2h7zM2,15h2v6l-1,-1h6v2L2,22v-7zM22,9h-2L20,3l1,1h-6L15,2h7v7zM15,22v-2h6l-1,1v-6h2v7h-7z" />
</vector>
4 changes: 2 additions & 2 deletions ucrop/src/main/res/drawable/ucrop_ic_scale_unselected.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/ucrop_color_inactive_controls_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillAlpha=".65"
android:fillColor="#FFF"
android:fillColor="#000"
android:fillType="nonZero"
android:pathData="M8,8v8h8L16,8L8,8zM6,6h12v12L6,18L6,6zM9,2v2L3,4l1,-1v6L2,9L2,2h7zM2,15h2v6l-1,-1h6v2L2,22v-7zM22,9h-2L20,3l1,1h-6L15,2h7v7zM15,22v-2h6l-1,1v-6h2v7h-7z" />
</vector>
1 change: 0 additions & 1 deletion ucrop/src/main/res/layout/ucrop_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,5 @@
android:text="@string/ucrop_scale" />

</LinearLayout>

</LinearLayout>
</RelativeLayout>
7 changes: 4 additions & 3 deletions ucrop/src/main/res/layout/ucrop_layout_rotate_wheel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
tools:showIn="@layout/ucrop_activity_photobox"
tools:showIn="@layout/ucrop_controls"
tools:visibility="visible">

<TextView
android:id="@+id/text_view_rotate"
style="@style/ucrop_TextViewWidgetText"
android:text="100°" />
tools:text="100°" />

<com.yalantis.ucrop.view.widget.HorizontalProgressWheelView
android:id="@+id/rotate_scroll_wheel"
Expand Down Expand Up @@ -43,7 +43,8 @@

<ImageView
style="@style/ucrop_ImageViewWidgetIcon"
app:srcCompat="@drawable/ucrop_ic_angle" />
android:tint="@color/ucrop_color_widget_rotate_angle"
android:src="@drawable/ucrop_ic_angle" />

</FrameLayout>

Expand Down
14 changes: 7 additions & 7 deletions ucrop/src/main/res/layout/ucrop_layout_scale_wheel.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:showIn="@layout/ucrop_activity_photobox"
tools:visibility="gone">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:showIn="@layout/ucrop_controls"
tools:visibility="gone">

<TextView
android:id="@+id/text_view_scale"
style="@style/ucrop_TextViewWidgetText"
android:text="100%"/>
android:text="100%" />

<com.yalantis.ucrop.view.widget.HorizontalProgressWheelView
android:id="@+id/scale_scroll_wheel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/text_view_scale"/>
android:layout_below="@+id/text_view_scale" />

</RelativeLayout>
31 changes: 21 additions & 10 deletions ucrop/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!--Palette-->
<color name="ucrop_color_black">#000</color>
<color name="ucrop_color_blaze_orange">#FF6300</color>
<color name="ucrop_color_ebony_clay">#20242F</color>
<color name="ucrop_color_heather">#B3BECE</color>
<color name="ucrop_color_white">#FFF</color>

<!--uCrop Activity-->
<color name="ucrop_color_toolbar">#fff</color>
<color name="ucrop_color_toolbar">@color/ucrop_color_white</color>
<color name="ucrop_color_statusbar">#f5f5f5</color>
<color name="ucrop_color_toolbar_widget">#000000</color>
<color name="ucrop_color_widget">#000</color>
<color name="ucrop_color_widget_active">#FFFFFF</color>
<color name="ucrop_color_active_controls_color">#FFFFFF</color>
<color name="ucrop_color_widget_rotate_mid_line">#512DA8</color>
<color name="ucrop_color_widget_background">#673AB7</color>
<color name="ucrop_color_widget_text">#000</color>
<color name="ucrop_color_progress_wheel_line">#000000</color>
<color name="ucrop_color_crop_background">#000</color>
<color name="ucrop_color_toolbar_widget">@color/ucrop_color_black</color>
<color name="ucrop_color_widget">@color/ucrop_color_black</color>
<color name="ucrop_color_widget_active">@color/ucrop_color_white</color>
<color name="ucrop_color_active_controls_color">@color/ucrop_color_blaze_orange</color>
<color name="ucrop_color_inactive_controls_color">@color/ucrop_color_heather</color>
<color name="ucrop_color_widget_rotate_mid_line">@color/ucrop_color_blaze_orange</color>
<color name="ucrop_color_widget_rotate_angle">@color/ucrop_color_ebony_clay</color>
<color name="ucrop_color_active_aspect_ratio">@color/ucrop_color_blaze_orange</color>
<color name="ucrop_color_inactive_aspect_ratio">@color/ucrop_color_ebony_clay</color>
<color name="ucrop_color_widget_background">@color/ucrop_color_ebony_clay</color>
<color name="ucrop_color_widget_text">@color/ucrop_color_blaze_orange</color>
<color name="ucrop_color_progress_wheel_line">@color/ucrop_color_ebony_clay</color>
<color name="ucrop_color_crop_background">@color/ucrop_color_black</color>

<!--Crop View-->
<color name="ucrop_color_default_crop_grid">#80ffffff</color>
Expand Down
2 changes: 1 addition & 1 deletion ucrop/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/ucrop_color_widget_background</item>
<item name="android:textColor">@color/ucrop_color_widget_text</item>
<item name="android:layout_marginTop">@dimen/ucrop_margit_top_widget_text</item>
<item name="android:textSize">@dimen/ucrop_text_size_widget_text</item>
</style>
Expand Down