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)
| <?xml version="1.0" encoding="utf-8"?> | |
| <set xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <translate | |
| android:duration="400" | |
| android:fromXDelta="100%p" | |
| android:toXDelta="0" | |
| android:interpolator="@android:anim/accelerate_interpolator" | |
| /> | |
| </set> |
| package com.zapbuild.myi.ui.view; | |
| import android.content.Context; | |
| import android.util.AttributeSet; | |
| import android.widget.LinearLayout; | |
| public class MyLayout extends LinearLayout { | |
| public MyLayout(Context context, AttributeSet attrs) { | |
| super(context, attrs); |
| public class DetectHomeScreen { | |
| private static List<String> homePackageNamesCache; | |
| public static List<String> homePackageName(Context context){ | |
| Intent intent = new Intent(Intent.ACTION_MAIN); | |
| intent.addCategory(Intent.CATEGORY_HOME); | |
| List<ResolveInfo> info = context.getPackageManager().queryIntentActivities(intent, 0); | |
| List<String> homes = new ArrayList<String>(info.size()); | |
| for(int i=0; i<info.size(); i++){ | |
| homes.add(info.get(i).activityInfo.packageName); |
| package com.zapbuild.myi.interactors; | |
| import android.location.Location; | |
| import android.os.Bundle; | |
| import com.google.android.gms.common.ConnectionResult; | |
| import com.google.android.gms.common.api.GoogleApiClient; | |
| import com.google.android.gms.location.LocationServices; | |
| import static com.zapbuild.myi.base.BaseApp.getContext; |
| package com.zapbuild.myi.interactors; | |
| import android.location.Address; | |
| import android.location.Geocoder; | |
| import android.location.Location; | |
| import com.zapbuild.myi.base.BaseApp; | |
| import java.util.List; | |
| import java.util.Locale; |
| # Add project specific ProGuard rules here. | |
| # By default, the flags in this file are appended to flags specified | |
| # in /home/zapbuild/adt-bundle-linux-x86_64-20140702/sdk/tools/proguard/proguard-android.txt | |
| # You can edit the include path and order by changing the proguardFiles | |
| # directive in build.gradle. | |
| # | |
| # For more details, see | |
| # http://developer.android.com/guide/developing/tools/proguard.html | |
| # Add any project specific keep options here: |
| package com.jiocartseller.base.ui.widget; | |
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.os.Build; | |
| import android.support.v7.widget.AppCompatTextView; | |
| import android.text.Editable; | |
| import android.text.TextUtils; | |
| import android.text.TextWatcher; |
| package com.jiocartseller.jio.ui.filter; | |
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import java.util.ArrayList; | |
| import butterknife.ButterKnife; |
| // |