This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Workaround for this bug: https://code.google.com/p/android/issues/detail?id=222208 | |
* In Android 7.0 Nougat, spinner mode for the DatePicker in DatePickerDialog is | |
* incorrectly displayed as calendar, even when the theme specifies otherwise. | |
* | |
* Modified slightly from the equivalent fix for TimePicker from @jeffdgr8: | |
* https://gist.github.com/jeffdgr8/6bc5f990bf0c13a7334ce385d482af9f | |
*/ | |
private void fixSpinner(Context context, int year, int month, int dayOfMonth) { | |
// The spinner vs not distinction probably started in lollipop but applying this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.packagename; | |
import android.app.TimePickerDialog; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.widget.TimePicker; | |
import java.lang.reflect.Constructor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | |
{ | |
var tabConfig = ViewModel.TabConfig; | |
var tabId = tabConfig["id"].ToString(); | |
var ignored = base.OnCreateView(inflater, container, savedInstanceState); | |
_scrollView = new ScrollView(Activity); | |
var layout = BuildLayout(inflater, tabConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Cirrious.MvvmCross.Touch.Views; | |
using UIKit; | |
using CoreGraphics; | |
using Foundation; | |
namespace MyApp.Touch.Views | |
{ | |
public class BaseViewController<TViewModel> : MvxViewController where TViewModel : MyBaseViewModelType | |
{ | |
#region Fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Register("dk.ostebaronen.droid.CircularProgressDrawable")] | |
public class CircularProgressDrawable | |
: Drawable | |
, IAnimatable | |
{ | |
private static readonly IInterpolator AngleInterpolator = new LinearInterpolator(); | |
private static readonly IInterpolator SweepInterpolator = new DecelerateInterpolator(); | |
private static readonly RectF _bounds = new RectF(); | |
private const int AngleAnimatorDuration = 2000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Tint-aware version of MvxSpinner so that it's styled properly | |
/// with AppCompat V21 | |
/// </summary> | |
public class MvxAppCompatSpinner : MvxSpinner, ITintableBackgroundView | |
{ | |
private static readonly int[] TintAttrs = | |
{ | |
Android.Resource.Attribute.Background, | |
Android.Resource.Attribute.PopupBackground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sjl.util; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import java.util.List; |