Results of some experiments to determine which Activity lifecycle methods get called in certain situations.
Launch:
- activity.onCreate()
- activity.onStart()
- activity.onResume()
- activity.onWindowFocusChanged(true)
| //From here: | |
| //https://github.com/adamsp/FragmentStatePagerIssueExample/blob/master/app/src/main/java/com/example/fragmentstatepagerissueexample/app/FixedFragmentStatePagerAdapter.java | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Android.OS; | |
| using Android.Runtime; | |
| using Android.Support.V4.App; | |
| using Android.Support.V4.View; |
| public static class ExampleViewHolder extends RecyclerView.ViewHolder | |
| implements View.OnClickListener { | |
| private int originalHeight = 0; | |
| private boolean isViewExpanded = false; | |
| private YourCustomView yourCustomView | |
| public ExampleViewHolder(View v) { | |
| super(v); | |
| v.setOnClickListener(this); |
| /* | |
| * Copyright 2015 Laurens Muller. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| // Copyright 2012 Square, Inc. | |
| package com.squareup.widgets; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| /** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
| public class AspectRatioImageView extends ImageView { |
| { | |
| "result": [ | |
| { | |
| "id": "site-81", | |
| "name": "Site: Test Website", | |
| "name2": "All Users", | |
| "image": "http:\\/\\/assets-cloud.enjin.com\\/users\\/109\\/avatar\\/medium.1422923371.png", | |
| "type": "site" | |
| }, | |
| { |
| public abstract class SearchFilterAdapterBase : MvxAdapter, IFilterable | |
| { | |
| protected SearchFilterAdapterBase(Context context) | |
| : base(context) {} | |
| protected SearchFilterAdapterBase(Context context, IMvxAndroidBindingContext bindingContext) | |
| : base(context, bindingContext) {} | |
| protected abstract Filter CreateFilter(); |
| /// <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 |
| public class EditorCell : ViewCell | |
| { | |
| public static readonly BindableProperty TextProperty = BindableProperty.Create<EditorCell, string>(p => p.Text, null, BindingMode.TwoWay); | |
| public string Text | |
| { | |
| get { return (string)GetValue(TextProperty); } | |
| set { SetValue(TextProperty, value); } | |
| } |
| a8bms1vbgt1ljiq9t45j5raa16 |