Android Question AnotherDatePicker - change background color

Discussion in 'Android Questions' started by ThePuiu, Jun 6, 2019.

  1. ThePuiu

    ThePuiu Active Member Licensed User

    Originally, my app was set to use the Dark theme. The client has changed his mind and now wants the Light theme! In this case, I no longer manage how to set the background of the control as transparent because now it is black... Any idea?
    Thank you!
     

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

  3. ThePuiu

    ThePuiu Active Member Licensed User

    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "7" android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    CreateResourceFromFile(Macro, Themes.LightTheme)
    'End of default text.
    AddApplicationText(<activity android:name="ice.zxing.CaptureActivity"
             android:screenOrientation=
    "portrait" android:configChanges="orientation|keyboardHidden"
             android:theme=
    "@android:style/Theme.NoTitleBar.Fullscreen"
             android:windowSoftInputMode=
    "stateAlwaysHidden">
          </
    activity>)
          AddPermission(android.permission.CALL_PHONE)
    'firebase
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
    'firebase end
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    There is a light theme available in B4XPreferencesDialog.

    [​IMG]

    If you don't want to create a complete form then check B4XPreferncesDialog code and see how it creates a light theme ADP. It uses the standard ADP template from XUI Views.
     
  5. ThePuiu

    ThePuiu Active Member Licensed User

    probably because of my poor English you did not understand my problem. In the attached image is my white layout and DateTime component which I can not make white background.
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    Try to reproduce it in a small project and upload it.
     
  7. ThePuiu

    ThePuiu Active Member Licensed User

    now that I tried to make a test project I found the problem ... I copied (I do not know from) in my project a modified version of AnotherDatePicker!

    dateField.Color = Colors.Black

    "Case closed" and I apologize for my stupidity.
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice