Back to project page TasksReminder.
The source code is released under:
MIT License
If you think the Android project TasksReminder listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
// // DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.0.1. ////from w w w . j a v a2 s .c o m package com.sampa.tasksreminder; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup.LayoutParams; import com.sampa.tasksreminder.R.id; import com.squareup.timessquare.CalendarPickerView; import org.androidannotations.api.SdkVersionHelper; import org.androidannotations.api.view.HasViews; import org.androidannotations.api.view.OnViewChangedListener; import org.androidannotations.api.view.OnViewChangedNotifier; public final class DatePickerActivity_ extends DatePickerActivity implements HasViews, OnViewChangedListener { private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier(); public final static String CALLER_EXTRA = "tasksReminder_dateCaller"; @Override public void onCreate(Bundle savedInstanceState) { OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_); init_(savedInstanceState); super.onCreate(savedInstanceState); OnViewChangedNotifier.replaceNotifier(previousNotifier); } private void init_(Bundle savedInstanceState) { OnViewChangedNotifier.registerOnViewChangedListener(this); injectExtras_(); } @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); } public static DatePickerActivity_.IntentBuilder_ intent(Context context) { return new DatePickerActivity_.IntentBuilder_(context); } public static DatePickerActivity_.IntentBuilder_ intent(Fragment supportFragment) { return new DatePickerActivity_.IntentBuilder_(supportFragment); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (((SdkVersionHelper.getSdkInt()< 5)&&(keyCode == KeyEvent.KEYCODE_BACK))&&(event.getRepeatCount() == 0)) { onBackPressed(); } return super.onKeyDown(keyCode, event); } @Override public void onViewChanged(HasViews hasViews) { calendar_view = ((CalendarPickerView) hasViews.findViewById(id.calendar_view)); initCalendar(); } private void injectExtras_() { Bundle extras_ = getIntent().getExtras(); if (extras_!= null) { if (extras_.containsKey(CALLER_EXTRA)) { caller = extras_.getByte(CALLER_EXTRA); } } } @Override public void setIntent(Intent newIntent) { super.setIntent(newIntent); injectExtras_(); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(com.sampa.tasksreminder.R.menu.date_picker, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { boolean handled = super.onOptionsItemSelected(item); if (handled) { return true; } int itemId_ = item.getItemId(); if (itemId_ == id.cancel) { cancel(); return true; } if (itemId_ == id.accept) { accept(); return true; } return false; } public static class IntentBuilder_ { private Context context_; private final Intent intent_; private Fragment fragmentSupport_; public IntentBuilder_(Context context) { context_ = context; intent_ = new Intent(context, DatePickerActivity_.class); } public IntentBuilder_(Fragment fragment) { fragmentSupport_ = fragment; context_ = fragment.getActivity(); intent_ = new Intent(context_, DatePickerActivity_.class); } public Intent get() { return intent_; } public DatePickerActivity_.IntentBuilder_ flags(int flags) { intent_.setFlags(flags); return this; } public void start() { context_.startActivity(intent_); } public void startForResult(int requestCode) { if (fragmentSupport_!= null) { fragmentSupport_.startActivityForResult(intent_, requestCode); } else { if (context_ instanceof Activity) { ((Activity) context_).startActivityForResult(intent_, requestCode); } else { context_.startActivity(intent_); } } } public DatePickerActivity_.IntentBuilder_ caller(byte caller) { intent_.putExtra(CALLER_EXTRA, caller); return this; } } }