freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[計算機軟件及應用]android22布局管理分析-資料下載頁

2025-10-10 04:00本頁面
  

【正文】 ScrollView示例 2 ? ImageView android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:src=@drawable/p1 ? android:layout_gravity=center_horizontal/ ? ImageView android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:src=@drawable/p1 ? android:layout_gravity=center_horizontal/ ? ImageView android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:src=@drawable/p1 ? android:layout_gravity=center_horizontal/ ? /LinearLayout ? /ScrollView ScrollView運行結(jié)果 選項卡 TabHost簡介 ? 使用 TabHost 可以在一個屏幕間進行不同版面的切換 ? TabHost在界面布局中特別常用也是很重要的一種布局方式。 ? 使用 TabHost可以有效的利用有限的屏幕資源,開發(fā)出用戶界面更加友好的應用程序。 選項卡 TabHost元素 1 ? TabHost是整個 Tab的容器,包括兩部分,TabWidget和 FrameLayout。 TabWidget就是每個tab的標簽, FrameLayout則是 tab內(nèi)容。 ? 如果我們使用 extends TabAcitivty,如同ListActivity, TabHost必須設置為@android:id/tabhost ? TabWidget必須設置 android:id為@android:id/tabs ? FrameLayout需要設置 android:id為@android:id/tabcontent 選項卡 TabHost示例 1 ? public class AndroidUIActivity extends TabActivity { ? ? @Override ? public void onCreate(Bundle savedInstanceState) { ? (savedInstanceState)。 ? setContentView()。 ? ? // tabHost是一個標簽容器 ? TabHost tabHost = ()。 ? ? // 每一個 TabSpec對象就是個標簽 ? // ()方法是設置標簽顯示樣式 ? // ()方法顯示標簽下方的內(nèi)容顯示 ? 選項卡 TabHost示例 2 ? // 定義第一個標簽 ? (tabHost ? .newTabSpec(OneTab) ? .setIndicator(OneTab, ? getResources().getDrawable()) ? .setContent())。 ? ? // 定義第二個標簽 ? (tabHost ? .newTabSpec(TwoTab) ? .setIndicator(TwoTab, ? getResources().getDrawable()) ? .setContent())。 ? 選項卡 TabHost示例 3 ? // 定義第三個標簽 ? (tabHost ? .newTabSpec(ThreeTab) ? .setIndicator(ThreeTab, ? getResources().getDrawable()) ? .setContent())。 ? ? } ? } 選項卡 TabHost示例 4 ? ?xml version= encoding=utf8? ? ! ? 根元素是 TabHost ,我們這個文件要和 TabActivity配合使用,在TabActivity的源代碼里寫死了要找的 Id是 , ? 因此這里的 ID也要定死成 TabHost 的 ID 是定死的 @android:id/tabhost 下面的類似。 ? ? TabHost xmlns:android= ? android:id=@android:id/tabhost ? android:layout_width=fill_parent ? android:layout_height=wrap_content ? ! TabWidget 就是標簽選項卡的頭部部分 ,注意 ID的寫法 ? TabWidget ? android:id=@android:id/tabs ? android:layout_width=fill_parent ? android:layout_height=wrap_content ? /TabWidget ? ! FrameLayout 就是標簽的內(nèi)容顯示部分,注意 ID的寫法,還要注意我們做了個上部空白設定 android:paddingTop=65dp,是為了不讓內(nèi)容和標簽重疊 選項卡 TabHost示例 5 ? FrameLayout ? android:id=@android:id/tabcontent ? android:layout_width=fill_parent ? android:layout_height=fill_parent ? ! LinearLayout 是一個標簽里的內(nèi)容,程序根據(jù)你定義的 ID來把他們放在不同的標簽下面 android:paddingtop=65dp ? LinearLayout ? android:id=@+id/linearLayout1 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? TextView ? android:id=@+id/textView1 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:text=標簽 1中的內(nèi)容 ? /TextView ? /LinearLayout ? ! LinearLayout 是另一個標簽里的內(nèi)容 選項卡 TabHost示例 6 ? LinearLayout ? android:id=@+id/linearLayout2 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? ? TextView ? android:id=@+id/textView2 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:text=標簽 2中的內(nèi)容 ? /TextView ? /LinearLayout 選項卡 TabHost示例 7 ? LinearLayout ? android:id=@+id/linearLayout3 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? ? TextView ? android:id=@+id/textView3 ? android:layout_width=wrap_content ? android:layout_height=wrap_content ? android:text=標簽 3中的內(nèi)容 ? /TextView ? /LinearLayout ? /FrameLayout ? ? /TabHost 選項卡 TabHost運行結(jié)果 選項卡 TabHost代碼分析 ? 新建一個 newTabSpec(newTabSpec)每一個 TabSpec對象就是個標簽 ? 設置其標簽和圖標 (setIndicator) ()方法是設置標簽顯示樣式 ? 設置內(nèi)容 (setContent) ()方法顯示標簽下方的內(nèi)容顯示 選項卡 TabHost主要事件 ? (new OnTabChangeListener() ? { ? // TODO Autogenerated method stub ? @Override ? public void onTabChanged(String tabId) ? { ? ……. ? } ? })。 總結(jié) ? 安卓的布局有哪些 ? 垂直滾動視圖的作用 ? 水平滾動視圖的作用
點擊復制文檔內(nèi)容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1