Android Open Source - calendar Accessible Text View






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.sleepbot.datetimepicker;
/*from ww  w.java2s.c  o m*/
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.Button;
import android.widget.TextView;

/**
 * Fake Button class, used so TextViews can announce themselves as Buttons, for accessibility.
 */
public class AccessibleTextView extends TextView {

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

    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
        if (Build.VERSION.SDK_INT >= 14) {
            super.onInitializeAccessibilityEvent(event);
            event.setClassName(Button.class.getName());
        }
    }

    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
        if (Build.VERSION.SDK_INT >= 14) {
            super.onInitializeAccessibilityNodeInfo(info);
            info.setClassName(Button.class.getName());
        }
    }
}




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