question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to change the color of the takePhotoButtonTitle, chooseFromLibraryButtonTitle

See original GitHub issue

Description

How to change the color of the takePhotoButtonTitle, chooseFromLibraryButtonTitle to “red”, e.g? I managed to change the background color, the color of the title and cancel button with code below. dialog-buttons-color

Source code

`<resources>

<!-- Dialog and Alert Colors. -->
<style name="DefaultExplainingPermissionsTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
      <!-- Used for the background -->
    <item name="android:background">#eeeeee</item>

    <!-- Used for the title -->
    <item name="android:textColor">#000000</item>

    <!-- Used for message color of dialog -->
    <item name="android:textColorPrimary">#ff0000</item>

    <!-- Used for the cancel button -->
    <item name="colorAccent">#4dcaba</item>
</style>
</resources> `

Solution

Add option buttonTitleColor.

Additional Information

  • React Native version: 0.43.1
  • Platform: Android
  • Development Operating System: Linux

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14

github_iconTop GitHub Comments

7reactions
Hektar90commented, May 24, 2018

If someone is still looking for an answer:

I added to my AppTheme

<item name="android:textColorAlertDialogListItem">YOUR_COLOR</item>

EDIT:

Note: This will also affect your ReactNative DevMenu

2reactions
mo-ah-dawoodcommented, Mar 9, 2019

My fix is to create a layout called list_item.xml it will override the default one

<?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="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/primary_light" android:fontFamily="@font/tajawal" android:gravity="center_vertical" android:paddingTop="15dp" android:paddingBottom="15dp" android:paddingLeft="25dp" android:paddingRight="25dp" android:ellipsize="marquee" />

\android\app\src\main\res\layout\list_item.xml

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to change the color of the takePhotoButtonTitle ... - GitHub
How to change the color of the takePhotoButtonTitle, chooseFromLibraryButtonTitle to "red", e.g? I managed to change the background color, the ...
Read more >
Image picker feature using React native - Medium
Take Photo Button Title ; Choose From Library Button Title; Choose Which Library Title; Custom Buttons; Tint Color; Camera Type; Media Type; Max...
Read more >
change button color react native - Stack Overflow
I want to simply change the color of the button, but i can't. I tried to change directly in the button, and pass...
Read more >
react-native-image-selector - npm
The only change could be iOS (for iOS 14 limited selection issues). ... takePhotoButtonTitle: '사진 촬영', chooseFromLibraryButtonTitle: ...
Read more >
React Native Pick Images From Camera & Gallery Example
... Take Photo Button Title; Choose From Library Button Title; Choose Which Library Title; Custom Buttons; Tint Color; Camera Type ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found