Android-image-cropper: Can change the color of toolbar of crop image activity?

Created on 15 Feb 2017  路  2Comments  路  Source: ArthurHub/Android-Image-Cropper

I want to change the color of toolbar in crop image activity, which is black by default, can I change it?

Most helpful comment

Yeah, if you change the style of the crop image activity in the manifest it will change the color of the toolbar. For example, you can use the following theme:

<style name="CropTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimary">@color/yourColor</item>
    <item name="colorPrimaryDark">@color/yourColorDark</item>
    <item name="android:windowBackground">@color/yourWindowBackgroundColor</item>
</style>

and then in the manifest change the activity to

<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
        android:theme="@style/CropTheme"/>

All 2 comments

Yeah, if you change the style of the crop image activity in the manifest it will change the color of the toolbar. For example, you can use the following theme:

<style name="CropTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimary">@color/yourColor</item>
    <item name="colorPrimaryDark">@color/yourColorDark</item>
    <item name="android:windowBackground">@color/yourWindowBackgroundColor</item>
</style>

and then in the manifest change the activity to

<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
        android:theme="@style/CropTheme"/>

see wiki

Was this page helpful?
0 / 5 - 0 ratings