Giter Site home page Giter Site logo

Comments (12)

J-Jamet avatar J-Jamet commented on May 21, 2024 1

SwitchDateTimePicker 1.3 solve issue with API < 21

from android-switchdatetimepicker.

J-Jamet avatar J-Jamet commented on May 21, 2024

Hi, can you explain how exception is thrown ?

from android-switchdatetimepicker.

pranavlathigara avatar pranavlathigara commented on May 21, 2024

open DateTime dialog in my app dialog...

from android-switchdatetimepicker.

J-Jamet avatar J-Jamet commented on May 21, 2024

Is your problem resolved with the new version?

from android-switchdatetimepicker.

traabefi avatar traabefi commented on May 21, 2024

I am getting the same error. If I launch the sample, on clicking the button everything crashes with the same error

from android-switchdatetimepicker.

traabefi avatar traabefi commented on May 21, 2024

Solved it by removing app theme attribute from your manifest

from android-switchdatetimepicker.

J-Jamet avatar J-Jamet commented on May 21, 2024

It's now solved with 1.2 version. Can you confirm ?

from android-switchdatetimepicker.

pranavlathigara avatar pranavlathigara commented on May 21, 2024

ok let me test...

from android-switchdatetimepicker.

vik17ag avatar vik17ag commented on May 21, 2024

Hi,
I am getting same error, and its not solved with version 1.2
Could you elaborate how did you remove app theme in manifest?
I am using android/;theme = "@style/AppTheme.NoActionbar"

thanks

from android-switchdatetimepicker.

J-Jamet avatar J-Jamet commented on May 21, 2024

Hi,
you need to use a Theme.AppCompat style (or descendant) with SwitchDateTime's activity. (I'll put it in bold in the documentation)
The manifest of "swidatetime" module doesn't contain @style/Theme.SwitchDateTime but in SwitchDateTimeDialogFragment, the theme is imported with
getActivity().getTheme().applyStyle(R.style.Theme_SwitchDateTime, false);
(who is a descendant of Theme.AppCompat), and uses custom arguments.
You can redefine each item in the theme separately but each variable's item must be redefined.

Your manifest can be like

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.kunzisoft.switchdatetimesample">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionbar"
        android:supportsRtl="true">
        <activity
            android:name="com.kunzisoft.switchdatetimesample.Sample"
            android:theme="@style/MyAppCustomTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

With MyAppCustomTheme a Theme.AppCompat theme.

from android-switchdatetimepicker.

srgiitd avatar srgiitd commented on May 21, 2024

Tested your sample on Samsung GT-7562 (Android 4.0.4, API 15) device and it crashes with the same issue as mentioned above. It works fine on my Nexus 4 and Nexus 5 devices. Looks like an unreliable widget.

from android-switchdatetimepicker.

J-Jamet avatar J-Jamet commented on May 21, 2024

Thx srgiitd for your reply. I finally identify the problem. In versions before Lollipop, it is impossible to use app:arg="?attr/customColorAttr" in views. Android logs and docs are not clear at all. I have solution, add "id style" parameters for TypedArray. I'm making a new version.

from android-switchdatetimepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.