Merge pull request #5839 from ByteHamster/samsung-warning
Work around Samsung having messed up the TimePicker
This commit is contained in:
commit
1dd6636a61
|
@ -0,0 +1,31 @@
|
|||
package de.danoeh.antennapod.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* Samsung's Android 6.0.1 has a bug that crashes the app when inflating a time picker.
|
||||
* This class serves as a workaround for affected devices.
|
||||
*/
|
||||
public class TimePicker extends android.widget.TimePicker {
|
||||
public TimePicker(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public TimePicker(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TimePicker(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRtlPropertiesChanged(int layoutDirection) {
|
||||
try {
|
||||
super.onRtlPropertiesChanged(layoutDirection);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
android:id="@+id/intervalRadioButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/feed_refresh_interval"/>
|
||||
android:text="@string/feed_refresh_interval" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner"
|
||||
|
@ -24,7 +24,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/feed_refresh_time" />
|
||||
|
||||
<TimePicker
|
||||
<de.danoeh.antennapod.view.TimePicker
|
||||
android:id="@+id/timePicker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -36,4 +36,5 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/feed_refresh_never" />
|
||||
|
||||
</RadioGroup>
|
||||
|
|
Loading…
Reference in New Issue