Android Open Source - calendar Accessible Date Animator






From Project

Back to project page calendar.

License

The source code is released under:

GNU General Public License

If you think the Android project calendar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.fourmob.datetimepicker.date;
/*  ww  w.j  a v a2 s.  co  m*/
import android.content.Context;
import android.text.format.DateUtils;
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityEvent;
import android.widget.ViewAnimator;

public class AccessibleDateAnimator extends ViewAnimator {
    private long mDateMillis;

    public AccessibleDateAnimator(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void setDateMillis(long dateMillis) {
        mDateMillis = dateMillis;
    }

    /**
     * Announce the currently-selected date when launched.
     */
    @Override
    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
        if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
            // Clear the event's current text so that only the current date will be spoken.
            event.getText().clear();
            int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR |
                    DateUtils.FORMAT_SHOW_WEEKDAY;

            String dateString = DateUtils.formatDateTime(getContext(), mDateMillis, flags);
            event.getText().add(dateString);
            return true;
        }
        return super.dispatchPopulateAccessibilityEvent(event);
    }
}




Java Source Code List

com.dorosh.calendar.creator.ideacalendar.app.AddActivity.java
com.dorosh.calendar.creator.ideacalendar.app.ArchiveListFragment.java
com.dorosh.calendar.creator.ideacalendar.app.DatabaseHelper.java
com.dorosh.calendar.creator.ideacalendar.app.MainActivity.java
com.dorosh.calendar.creator.ideacalendar.app.SettingsActivity.java
com.dorosh.calendar.creator.ideacalendar.app.SetupActivity.java
com.dorosh.calendar.creator.ideacalendar.app.StartAcitivity.java
com.dorosh.calendar.creator.ideacalendar.app.TODOListFragment.java
com.dorosh.calendar.creator.ideacalendar.app.Cursors.TODOCursorAdapter.java
com.fourmob.datetimepicker.BuildConfig.java
com.fourmob.datetimepicker.BuildConfig.java
com.fourmob.datetimepicker.Utils.java
com.fourmob.datetimepicker.date.AccessibleDateAnimator.java
com.fourmob.datetimepicker.date.DatePickerController.java
com.fourmob.datetimepicker.date.DatePickerDialog.java
com.fourmob.datetimepicker.date.DayPickerView.java
com.fourmob.datetimepicker.date.SimpleMonthAdapter.java
com.fourmob.datetimepicker.date.SimpleMonthView.java
com.fourmob.datetimepicker.date.TextViewWithCircularIndicator.java
com.fourmob.datetimepicker.date.YearPickerView.java
com.sleepbot.datetimepicker.AccessibleTextView.java
com.sleepbot.datetimepicker.time.AmPmCirclesView.java
com.sleepbot.datetimepicker.time.CircleView.java
com.sleepbot.datetimepicker.time.RadialPickerLayout.java
com.sleepbot.datetimepicker.time.RadialSelectorView.java
com.sleepbot.datetimepicker.time.RadialTextsView.java
com.sleepbot.datetimepicker.time.TimePickerDialog.java