Comments (12)
SwitchDateTimePicker 1.3 solve issue with API < 21
from android-switchdatetimepicker.
Hi, can you explain how exception is thrown ?
from android-switchdatetimepicker.
open DateTime dialog in my app dialog...
from android-switchdatetimepicker.
Is your problem resolved with the new version?
from android-switchdatetimepicker.
I am getting the same error. If I launch the sample, on clicking the button everything crashes with the same error
from android-switchdatetimepicker.
Solved it by removing app theme attribute from your manifest
from android-switchdatetimepicker.
It's now solved with 1.2 version. Can you confirm ?
from android-switchdatetimepicker.
ok let me test...
from android-switchdatetimepicker.
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.
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.
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.
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)
- It opens slowly HOT 2
- i can't set minimum date HOT 1
- i can not be set minimum time HOT 2
- set default date on click as todays date currently showing december 2017 HOT 5
- How to disable the time selection. HOT 2
- Not close picker in invalid case HOT 2
- warn: ignoring element 'g' with unknown namespace HOT 3
- Migrate to androidX HOT 1
- How To Get Current Selected Date and Time as String? HOT 1
- How to change colour of Weekdays and background of button Bar at the bottom? HOT 1
- Option to use digital clock for Time chooser
- App crashes on selecting year HOT 1
- How to show picker when click from dailog HOT 1
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. HOT 1
- How to use this widget for multiple edit texts ? HOT 1
- Margin between header and calendar is too high. HOT 2
- Margin between header and calendar is too high. HOT 1
- Couldn't find the repo HOT 1
- Set week start day
- A HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-switchdatetimepicker.