Created
March 15, 2016 21:17
-
-
Save WonderCsabo/be01ba7e5af3db7c26a0 to your computer and use it in GitHub Desktop.
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
// | |
// DO NOT EDIT THIS FILE. | |
// Generated using AndroidAnnotations 4.0-SNAPSHOT. | |
// | |
// You can create a larger work that contains this file and distribute that work under terms of your choice. | |
// | |
package com.oliver.oliver; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Build.VERSION; | |
import android.os.Build.VERSION_CODES; | |
import android.os.Bundle; | |
import android.support.v4.app.ActivityCompat; | |
import android.view.View; | |
import android.view.ViewGroup.LayoutParams; | |
import org.androidannotations.api.builder.ActivityIntentBuilder; | |
import org.androidannotations.api.builder.PostActivityStarter; | |
import org.androidannotations.api.view.HasViews; | |
import org.androidannotations.api.view.OnViewChangedNotifier; | |
public final class MyActivityImpl | |
extends MyActivity | |
implements HasViews | |
{ | |
private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier(); | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_); | |
init_(savedInstanceState); | |
super.onCreate(savedInstanceState); | |
OnViewChangedNotifier.replaceNotifier(previousNotifier); | |
} | |
private void init_(Bundle savedInstanceState) { | |
} | |
@Override | |
public void setContentView(int layoutResID) { | |
super.setContentView(layoutResID); | |
onViewChangedNotifier_.notifyViewChanged(this); | |
} | |
@Override | |
public void setContentView(View view, LayoutParams params) { | |
super.setContentView(view, params); | |
onViewChangedNotifier_.notifyViewChanged(this); | |
} | |
@Override | |
public void setContentView(View view) { | |
super.setContentView(view); | |
onViewChangedNotifier_.notifyViewChanged(this); | |
} | |
@Override | |
public String toString() { | |
return "Hello, AndroidAnnotations!"; | |
} | |
public static MyActivityImpl.IntentBuilder_ intent(Context context) { | |
return new MyActivityImpl.IntentBuilder_(context); | |
} | |
public static MyActivityImpl.IntentBuilder_ intent(android.app.Fragment fragment) { | |
return new MyActivityImpl.IntentBuilder_(fragment); | |
} | |
public static MyActivityImpl.IntentBuilder_ intent(android.support.v4.app.Fragment supportFragment) { | |
return new MyActivityImpl.IntentBuilder_(supportFragment); | |
} | |
public static class IntentBuilder_ | |
extends ActivityIntentBuilder<MyActivityImpl.IntentBuilder_> | |
{ | |
private android.app.Fragment fragment_; | |
private android.support.v4.app.Fragment fragmentSupport_; | |
public IntentBuilder_(Context context) { | |
super(context, MyActivityImpl.class); | |
} | |
public IntentBuilder_(android.app.Fragment fragment) { | |
super(fragment.getActivity(), MyActivityImpl.class); | |
fragment_ = fragment; | |
} | |
public IntentBuilder_(android.support.v4.app.Fragment fragment) { | |
super(fragment.getActivity(), MyActivityImpl.class); | |
fragmentSupport_ = fragment; | |
} | |
@Override | |
public PostActivityStarter startForResult(int requestCode) { | |
if (fragmentSupport_!= null) { | |
fragmentSupport_.startActivityForResult(intent, requestCode); | |
} else { | |
if (fragment_!= null) { | |
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) { | |
fragment_.startActivityForResult(intent, requestCode, lastOptions); | |
} else { | |
fragment_.startActivityForResult(intent, requestCode); | |
} | |
} else { | |
if (context instanceof Activity) { | |
Activity activity = ((Activity) context); | |
ActivityCompat.startActivityForResult(activity, intent, requestCode, lastOptions); | |
} else { | |
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) { | |
context.startActivity(intent, lastOptions); | |
} else { | |
context.startActivity(intent); | |
} | |
} | |
} | |
} | |
return new PostActivityStarter(context); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment