diff --git a/BatchStepSensor/BatchStepSensor/BatchStepSensor.csproj b/BatchStepSensor/BatchStepSensor/BatchStepSensor.csproj index 55f0d3de5..0ecfe2382 100644 --- a/BatchStepSensor/BatchStepSensor/BatchStepSensor.csproj +++ b/BatchStepSensor/BatchStepSensor/BatchStepSensor.csproj @@ -42,12 +42,6 @@ - - ..\packages\Xamarin.Android.Support.v13.20.0.0.4\lib\MonoAndroid32\Xamarin.Android.Support.v13.dll - - - ..\packages\Xamarin.Android.Support.v4.20.0.0.4\lib\MonoAndroid32\Xamarin.Android.Support.v4.dll - @@ -71,7 +65,6 @@ - diff --git a/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs b/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs index dbf392681..8045c4c6f 100644 --- a/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs +++ b/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs @@ -17,7 +17,7 @@ namespace BatchStepSensor { - public class BatchStepSensorFragment : Android.Support.V4.App.Fragment, OnCardClickListener + public class BatchStepSensorFragment : Fragment, OnCardClickListener { public const string TAG = "StepSensorSample"; diff --git a/BatchStepSensor/BatchStepSensor/CardStream/Card.cs b/BatchStepSensor/BatchStepSensor/CardStream/Card.cs index 60501d7e0..ed11ee81e 100644 --- a/BatchStepSensor/BatchStepSensor/CardStream/Card.cs +++ b/BatchStepSensor/BatchStepSensor/CardStream/Card.cs @@ -238,6 +238,11 @@ private void AddAction(string label, int id, int type) public Card SetActionVisibility(int actionId, Boolean isVisible) { ViewStates visibilityFlag = isVisible ? ViewStates.Visible : ViewStates.Gone; + foreach (CardAction action in mCardActions) { + if (action.Id == actionId && action.ActionView != null) { + action.ActionView.Visibility = visibilityFlag; + } + } return this; } diff --git a/BatchStepSensor/BatchStepSensor/CardStream/CardStreamFragment.cs b/BatchStepSensor/BatchStepSensor/CardStream/CardStreamFragment.cs index c51e1949d..8985e0b52 100644 --- a/BatchStepSensor/BatchStepSensor/CardStream/CardStreamFragment.cs +++ b/BatchStepSensor/BatchStepSensor/CardStream/CardStreamFragment.cs @@ -18,7 +18,7 @@ namespace BatchStepSensor.CardStream /// A Fragment that handles a stream of cards. /// Cards can be shown or hidden. When a card is shown it can also be marked as not-dismissible. /// - public class CardStreamFragment : Android.Support.V4.App.Fragment + public class CardStreamFragment : Fragment { private const int INITIAL_SIZE = 15; private CardStreamLinearLayout mLayout = null; diff --git a/BatchStepSensor/BatchStepSensor/CardStream/CardStreamLinearLayout.cs b/BatchStepSensor/BatchStepSensor/CardStream/CardStreamLinearLayout.cs index 4b861e34a..6e141b762 100644 --- a/BatchStepSensor/BatchStepSensor/CardStream/CardStreamLinearLayout.cs +++ b/BatchStepSensor/BatchStepSensor/CardStream/CardStreamLinearLayout.cs @@ -117,8 +117,6 @@ public bool OnTouch (View v, MotionEvent e) private OnHierarchyChangeListener mOnHieratchyChangeListener; - private int mLastDownX; - public CardStreamLinearLayout (Context context) : base (context) { @@ -368,7 +366,6 @@ void Initialize (IAttributeSet attrs, int defStyle) if (attrs != null) { - var v = Resource.Styleable.CardStream; TypedArray a = Context.ObtainStyledAttributes (attrs, Resource.Styleable.CardStream, defStyle, 0); if (a != null) { diff --git a/BatchStepSensor/BatchStepSensor/CardStream/StreamRetentionFragment.cs b/BatchStepSensor/BatchStepSensor/CardStream/StreamRetentionFragment.cs index 978cdfe27..26965630a 100644 --- a/BatchStepSensor/BatchStepSensor/CardStream/StreamRetentionFragment.cs +++ b/BatchStepSensor/BatchStepSensor/CardStream/StreamRetentionFragment.cs @@ -3,7 +3,7 @@ namespace BatchStepSensor.CardStream { - public class StreamRetentionFragment : Android.Support.V4.App.Fragment + public class StreamRetentionFragment : Fragment { CardStreamState mState; public override void OnActivityCreated (Android.OS.Bundle savedInstanceState) diff --git a/BatchStepSensor/BatchStepSensor/MainActivity.cs b/BatchStepSensor/BatchStepSensor/MainActivity.cs index 8e6feee8b..df0e2b3e4 100644 --- a/BatchStepSensor/BatchStepSensor/MainActivity.cs +++ b/BatchStepSensor/BatchStepSensor/MainActivity.cs @@ -27,7 +27,7 @@ protected override void OnCreate (Bundle bundle) base.OnCreate (bundle); SetContentView (Resource.Layout.activity_main); - var fm = SupportFragmentManager; + var fm = FragmentManager; var fragment = (BatchStepSensorFragment)fm.FindFragmentByTag (FRAGTAG); if (fragment == null) { @@ -38,9 +38,9 @@ protected override void OnCreate (Bundle bundle) } // Use fragment as click listener for cards, but must implement correct interface - if (!(fragment is OnCardClickListener)) { + if (!(fragment is OnCardClickListener)) throw new InvalidCastException ("BatchStepSensorFragment must implement OnCardClickListener interface."); - } + var clickListener = (OnCardClickListener)fm.FindFragmentByTag (FRAGTAG); mRetentionFragment = (StreamRetentionFragment)fm.FindFragmentByTag (RETENTION_TAG); if (mRetentionFragment == null) { @@ -62,7 +62,7 @@ public CardStreamFragment CardStream get { if (mCardStreamFragment == null) { - mCardStreamFragment = (CardStreamFragment)SupportFragmentManager.FindFragmentById (Resource.Id.fragment_cardstream); + mCardStreamFragment = (CardStreamFragment)FragmentManager.FindFragmentById (Resource.Id.fragment_cardstream); } return mCardStreamFragment; } diff --git a/BatchStepSensor/BatchStepSensor/packages.config b/BatchStepSensor/BatchStepSensor/packages.config deleted file mode 100644 index 1e1cb540e..000000000 --- a/BatchStepSensor/BatchStepSensor/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file