/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.view;
import android.content.ClipData;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Camera;
import android.graphics.Canvas;
import android.graphics.Insets;
import android.graphics.Interpolator;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
import android.graphics.Shader;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.hardware.display.DisplayManagerGlobal;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.FloatProperty;
import android.util.LayoutDirection;
import android.util.Log;
import android.util.LongSparseLongArray;
import android.util.Pools.SynchronizedPool;
import android.util.Property;
import android.util.SparseArray;
import android.util.SuperNotCalledException;
import android.util.TypedValue;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.AccessibilityIterators.TextSegmentIterator;
import android.view.AccessibilityIterators.CharacterTextSegmentIterator;
import android.view.AccessibilityIterators.WordTextSegmentIterator;
import android.view.AccessibilityIterators.ParagraphTextSegmentIterator;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityEventSource;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeProvider;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Transformation;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.widget.ScrollBarDrawable;
import static android.os.Build.VERSION_CODES.*;
import static java.lang.Math.max;
import com.android.internal.R;
import com.android.internal.util.Predicate;
import com.android.internal.view.menu.MenuBuilder;
import com.google.android.collect.Lists;
import com.google.android.collect.Maps;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
/**
* <p>
* This class represents the basic building block for user interface components. A View
* occupies a rectangular area on the screen and is responsible for drawing and
* event handling. View is the base class for <em>widgets</em>, which are
* used to create interactive UI components (buttons, text fields, etc.). The
* {@link android.view.ViewGroup} subclass is the base class for <em>layouts</em>, which
* are invisible containers that hold other Views (or other ViewGroups) and define
* their layout properties.
* </p>
*
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For information about using this class to develop your application's user interface,
* read the <a href="{@docRoot}guide/topics/ui/index.html">User Interface</a> developer guide.
* </div>
*
* <a name="Using"></a>
* <h3>Using Views</h3>
* <p>
* All of the views in a window are arranged in a single tree. You can add views
* either from code or by specifying a tree of views in one or more XML layout
* files. There are many specialized subclasses of views that act as controls or
* are capable of displaying text, images, or other content.
* </p>
* <p>
* Once you have created a tree of views, there are typically a few types of
* common operations you may wish to perform:
* <ul>
* <li><strong>Set properties:</strong> for example setting the text of a
* {@link android.widget.TextView}. The available properties and the methods
* that set them will vary among the different subclasses of views. Note that
* properties that are known at build time can be set in the XML layout
* files.</li>
* <li><strong>Set focus:</strong> The framework will handled moving focus in
* response to user input. To force focus to a specific view, call
* {@link #requestFocus}.</li>
* <li><strong>Set up listeners:</strong> Views allow clients to set listeners
* that will be notified when something interesting happens to the view. For
* example, all views will let you set a listener to be notified when the view
* gains or loses focus. You can register such a listener using
* {@link #setOnFocusChangeListener(android.view.View.OnFocusChangeListener)}.
* Other view subclasses offer more specialized listeners. For example, a Button
* exposes a listener to notify clients when the button is clicked.</li>
* <li><strong>Set visibility:</strong> You can hide or show views using
* {@link #setVisibility(int)}.</li>
* </ul>
* </p>
* <p><em>
* Note: The Android framework is responsible for measuring, laying out and
* drawing views. You should not call methods that perform these actions on
* views yourself unless you are actually implementing a
* {@link android.view.ViewGroup}.
* </em></p>
*
* <a name="Lifecycle"></a>
* <h3>Implementing a Custom View</h3>
*
* <p>
* To implement a custom view, you will usually begin by providing overrides for
* some of the standard methods that the framework calls on all views. You do
* not need to override all of these methods. In fact, you can start by just
* overriding {@link #onDraw(android.graphics.Canvas)}.
* <table border="2" width="85%" align="center" cellpadding="5">
* <thead>
* <tr><th>Category</th> <th>Methods</th> <th>Description</th></tr>
* </thead>
*
* <tbody>
* <tr>
* <td rowspan="2">Creation</td>
* <td>Constructors</td>
* <td>There is a form of the constructor that are called when the view
* is created from code and a form that is called when the view is
* inflated from a layout file. The second form should parse and apply
* any attributes defined in the layout file.
* </td>
* </tr>
* <tr>
* <td><code>{@link #onFinishInflate()}</code></td>
* <td>Called after a view and all of its children has been inflated
* from XML.</td>
* </tr>
*
* <tr>
* <td rowspan="3">Layout</td>
* <td><code>{@link #onMeasure(int, int)}</code></td>
* <td>Called to determine the size requirements for this view and all
* of its children.
* </td>
* </tr>
* <tr>
* <td><code>{@link #onLayout(boolean, int, int, int, int)
没有合适的资源?快使用搜索试试~ 我知道了~
android 4.4.2 sdk源码
共2000个文件
java:8116个
properties:1个
5星 · 超过95%的资源 需积分: 9 66 下载量 21 浏览量
2014-12-11
23:45:43
上传
评论
收藏 9.81MB 7Z 举报
温馨提示
打开Eclipse -> 随便找一个工程点击一个关键字Ctrl+左键 -> Add Source -> Add Folder -> 找到刚刚下载的Source -> 确定 -> 完成。 因为已经添加过了以上流程根据印象写的。
资源推荐
资源详情
资源评论
收起资源包目录
android 4.4.2 sdk源码 (2000个子文件)
View.java 742KB
ActivityManagerService.java 694KB
PackageManagerService.java 496KB
WindowManagerService.java 457KB
TextView.java 336KB
ContactsContract.java 330KB
Intent.java 293KB
BackupManagerService.java 272KB
ViewRootImpl.java 269KB
Settings.java 248KB
ViewGroup.java 247KB
AbsListView.java 246KB
PhoneWindowManager.java 241KB
BatteryStatsImpl.java 225KB
Activity.java 224KB
ActivityThread.java 205KB
ConnectivityService.java 199KB
AudioService.java 194KB
WifiStateMachine.java 182KB
ActivityManagerNative.java 177KB
ScannerTest.java 175KB
PackageParser.java 168KB
Editor.java 161KB
Camera.java 161KB
ActivityStack.java 160KB
InputMethodManagerService.java 153KB
AndroidKeyStoreTest.java 151KB
RIL.java 146KB
PhoneWindow.java 145KB
ListView.java 143KB
MediaArtistNativeHelper.java 142KB
Settings.java 142KB
ForkJoinPool.java 141KB
MotionEvent.java 136KB
AccessibilityManagerService.java 135KB
PackageManager.java 134KB
ProcessStats.java 133KB
DatabaseMetaData.java 131KB
SyncManager.java 131KB
AccountManagerService.java 131KB
PackageManagerTests.java 130KB
MediaPlayer.java 128KB
Context.java 127KB
WifiP2pService.java 125KB
PrintJobConfigActivity.java 124KB
Character.java 121KB
DevicePolicyManagerService.java 121KB
KeyEvent.java 120KB
VideoEditorAPITest.java 120KB
MediaFocusControl.java 120KB
SocketChannelTest.java 119KB
EditStyledText.java 117KB
ActivityStackSupervisor.java 116KB
BigDecimal.java 114KB
RecipientEditTextView.java 113KB
GLLogWrapper.java 112KB
NativeCryptoTest.java 111KB
PhoneStatusBar.java 111KB
ConcurrentSkipListMap.java 110KB
ActiveServices.java 110KB
ViewPager.java 110KB
PagedView.java 110KB
PowerManagerService.java 108KB
MountService.java 108KB
Arrays.java 108KB
MediaRouter.java 107KB
FileChannelTest.java 106KB
CalendarContract.java 106KB
Collections.java 106KB
AudioManager.java 105KB
SyncStorageEngine.java 104KB
GridLayout.java 102KB
RecurrenceProcessorTest.java 101KB
BatteryStats.java 101KB
GridLayout.java 99KB
VCardBuilder.java 99KB
Resources.java 99KB
NumberPicker.java 98KB
JunitTestCases.java 98KB
ContentResolver.java 98KB
AccountManager.java 98KB
LocationManagerService.java 97KB
VCardEntry.java 97KB
DatabaseHelper.java 97KB
DcTracker.java 97KB
NotificationManagerService.java 97KB
InputMethodService.java 96KB
AccessibilityNodeInfo.java 95KB
RemoteViews.java 93KB
SQLiteDatabase.java 92KB
PhoneNumberUtils.java 92KB
ObjectInputStream.java 91KB
ExifInterface.java 90KB
WapPushTest.java 90KB
AbstractQueuedSynchronizer.java 89KB
Contacts.java 89KB
WebView.java 88KB
DualPivotQuicksort.java 88KB
Formatter.java 87KB
DatagramChannelTest.java 87KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- sleaf20102015-04-25挺好,内容不错
- 南风吹客衣_2015-11-18很好可以用
StoneLiu999
- 粉丝: 157
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 351AN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 346G-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 342P-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 3420-VB一款SOT23封装N-Channel场效应MOS管
- UDP原理详解和代码示例
- 3414-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 以下是一些大数据面试习题.pdf
- 3414-CMN3414-VB一款SOT23封装N-Channel场效应MOS管
- ASTM G154-2023 Practice for Operating Fluorescent Ultraviolet UV
- 小米智能摄像机 云台版2K 固件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功