Skip to content

Commit 22dbbde

Browse files
committed
new file: platform_packages_apps_music-master/res/layout-keysexposed/create_playlist.xml
1 parent 2cd8fbc commit 22dbbde

8,923 files changed

Lines changed: 2804464 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

adapter/Adapter.java

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* Copyright (C) 2006 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package android.widget;
18+
19+
import android.database.DataSetObserver;
20+
import android.view.View;
21+
import android.view.ViewGroup;
22+
23+
/***
24+
* 一个适配器是数据和适配器视图的桥梁,适配器提供访问数据项的能力,并且为每条数据指定视图
25+
*/
26+
//好好学习这种模式,同时好好学习接口的用法等,这是什么模式呢,包含了好几种吧??但真心不像是适配器模式
27+
public interface Adapter {
28+
29+
void registerDataSetObserver(DataSetObserver observer);
30+
31+
void unregisterDataSetObserver(DataSetObserver observer);
32+
33+
int getCount();
34+
35+
36+
Object getItem(int position);
37+
38+
long getItemId(int position);
39+
40+
//有何用处
41+
boolean hasStableIds();
42+
43+
//可以进一步优化吧
44+
View getView(int position, View convertView, ViewGroup parent);
45+
46+
//这个是一种view类型
47+
static final int IGNORE_ITEM_VIEW_TYPE = AdapterView.ITEM_VIEW_TYPE_IGNORE;
48+
49+
int getItemViewType(int position);
50+
51+
int getViewTypeCount();
52+
53+
static final int NO_SELECTION = Integer.MIN_VALUE;
54+
55+
boolean isEmpty();
56+
}
57+
58+

0 commit comments

Comments
 (0)