Search in sources :

Example 1 with TimerSetupView

use of org.omnirom.deskclock.TimerSetupView in project android_packages_apps_OmniClock by omnirom.

the class TimerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(org.omnirom.deskclock.R.layout.timer_fragment, container, false);
    mContentView = (ViewGroup) view;
    mTimerView = view.findViewById(org.omnirom.deskclock.R.id.timer_view);
    mSetupView = (TimerSetupView) view.findViewById(org.omnirom.deskclock.R.id.timer_setup);
    mViewPager = (VerticalViewPager) view.findViewById(org.omnirom.deskclock.R.id.vertical_view_pager);
    mPageIndicators[0] = (ImageView) view.findViewById(org.omnirom.deskclock.R.id.page_indicator0);
    mPageIndicators[1] = (ImageView) view.findViewById(org.omnirom.deskclock.R.id.page_indicator1);
    mPageIndicators[2] = (ImageView) view.findViewById(org.omnirom.deskclock.R.id.page_indicator2);
    mPageIndicators[3] = (ImageView) view.findViewById(org.omnirom.deskclock.R.id.page_indicator3);
    mDeleteTransition = new AutoTransition();
    mDeleteTransition.setDuration(ANIMATION_TIME_MILLIS / 2);
    mDeleteTransition.setInterpolator(new AccelerateDecelerateInterpolator());
    return view;
}
Also used : AutoTransition(android.transition.AutoTransition) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator) TimerSetupView(org.omnirom.deskclock.TimerSetupView) ImageView(android.widget.ImageView) View(android.view.View)

Example 2 with TimerSetupView

use of org.omnirom.deskclock.TimerSetupView in project android_packages_apps_OmniClock by omnirom.

the class TimerFullScreenFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View v = inflater.inflate(org.omnirom.deskclock.R.layout.timer_full_screen_fragment, container, false);
    // Handle arguments from parent
    Bundle bundle = getArguments();
    if (bundle != null && bundle.containsKey(Timers.TIMESUP_MODE)) {
        if (bundle.getBoolean(Timers.TIMESUP_MODE, false)) {
            try {
                mOnEmptyListListener = (OnEmptyListListener) getActivity();
            } catch (ClassCastException e) {
                Log.wtf(TAG, getActivity().toString() + " must implement OnEmptyListListener");
            }
        }
    }
    mFab = (ImageButton) v.findViewById(org.omnirom.deskclock.R.id.fab);
    mTimersList = (StaggeredGridView) v.findViewById(org.omnirom.deskclock.R.id.timers_list);
    // For tablets in landscape, the count will be 2. All else will be 1.
    mColumnCount = getResources().getInteger(org.omnirom.deskclock.R.integer.timer_column_count);
    mTimersList.setColumnCount(mColumnCount);
    // Set this to true; otherwise adding new views to the end of the list won't cause
    // everything above it to be filled in correctly.
    mTimersList.setGuardAgainstJaggedEdges(true);
    mTimersListPage = v.findViewById(org.omnirom.deskclock.R.id.timers_list_page);
    mTimerSetup = (TimerSetupView) v.findViewById(org.omnirom.deskclock.R.id.timer_setup);
    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    mNotificationManager = (NotificationManager) getActivity().getSystemService(Context.NOTIFICATION_SERVICE);
    return v;
}
Also used : Bundle(android.os.Bundle) StaggeredGridView(org.omnirom.deskclock.widget.sgv.StaggeredGridView) TimerSetupView(org.omnirom.deskclock.TimerSetupView) View(android.view.View) TextView(android.widget.TextView)

Aggregations

View (android.view.View)2 TimerSetupView (org.omnirom.deskclock.TimerSetupView)2 Bundle (android.os.Bundle)1 AutoTransition (android.transition.AutoTransition)1 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 StaggeredGridView (org.omnirom.deskclock.widget.sgv.StaggeredGridView)1