Deprecate unsupported widgets.

Change-Id: I154236f07745b25200e77a473b810f45de07d0ef
This commit is contained in:
Romain Guy
2012-07-03 17:23:30 -07:00
parent 86fc2c9b74
commit 86ca5d3513
3 changed files with 17 additions and 6 deletions

View File

@@ -34,13 +34,17 @@ import java.util.Calendar;
*
* FIXME: implement separate views for hours/minutes/seconds, so
* proportional fonts don't shake rendering
*
* @deprecated It is recommended you use a {@link TextView} and {@link DateFormat}
* to implement the same behavior.
*/
@Deprecated
public class DigitalClock extends TextView {
Calendar mCalendar;
private final static String m12 = "h:mm:ss aa";
private final static String m24 = "k:mm:ss";
@SuppressWarnings("FieldCanBeLocal") // We must keep a reference to this observer
private FormatChangeObserver mFormatChangeObserver;
private Runnable mTicker;
@@ -52,17 +56,15 @@ public class DigitalClock extends TextView {
public DigitalClock(Context context) {
super(context);
initClock(context);
initClock();
}
public DigitalClock(Context context, AttributeSet attrs) {
super(context, attrs);
initClock(context);
initClock();
}
private void initClock(Context context) {
Resources r = mContext.getResources();
private void initClock() {
if (mCalendar == null) {
mCalendar = Calendar.getInstance();
}

View File

@@ -78,7 +78,12 @@ import android.view.accessibility.AccessibilityNodeInfo;
* @attr ref android.R.styleable#SlidingDrawer_orientation
* @attr ref android.R.styleable#SlidingDrawer_allowSingleTap
* @attr ref android.R.styleable#SlidingDrawer_animateOnClick
*
* @deprecated This class is not supported anymore. It is recommended you
* base your own implementation on the source code for the Android Open
* Source Project if you must use it in your application.
*/
@Deprecated
public class SlidingDrawer extends ViewGroup {
public static final int ORIENTATION_HORIZONTAL = 0;
public static final int ORIENTATION_VERTICAL = 1;

View File

@@ -37,7 +37,11 @@ import android.widget.RelativeLayout;
* layout for this object.
*
* @attr ref android.R.styleable#TwoLineListItem_mode
*
* @deprecated This class can be implemented easily by apps using a {@link RelativeLayout}
* or a {@link LinearLayout}.
*/
@Deprecated
@Widget
public class TwoLineListItem extends RelativeLayout {