android學習筆記,android學習資料

來源:互聯網
上載者:User

android學習筆記,android學習資料

故事是這樣的,因公司目前一個移動體征檢測產品需要連網。部門只有一個移動開發小夥,其他都是C#開發人員。客戶是爺啊!正當我無人可用、一籌莫展的時候,這小夥竟然叫我這個安卓新手給他搬磚。沒辦法,我這老傢伙也硬著頭皮上了。小夥帶著我這個拖油瓶一路走來,寫一點自己項目中的認知

    1、android studio中添加圖片名稱是不能有大寫字元,否則編譯報錯

    2、以XML方式書寫TabLayout時,代碼如下。需要注意的地方如

  

<TabHost       android:id="@+id/main_tabHost"       android:layout_width="match_parent"       android:layout_height="match_parent">       <LinearLayout           android:layout_width="fill_parent"           android:layout_height="fill_parent"           android:orientation="vertical">           <!-- TabWidget的id屬性必須為 @android:id/tabs -->           <TabWidget               android:id="@android:id/tabs"               android:layout_width="match_parent"               android:layout_height="wrap_content"               android:layout_weight="0"               android:orientation="horizontal" />           <!-- FrameLayout的id屬性必須為 @android:id/tabcontent -->           <FrameLayout               android:id="@android:id/tabcontent"               android:layout_width="match_parent"               android:layout_height="match_parent"               android:layout_weight="0" >           <ImageView               android:id="@+id/tab1"               android:layout_width="fill_parent"               android:layout_height="wrap_content"               android:src="@drawable/sample"               />           <ImageView               android:id="@+id/tab2"               android:layout_width="wrap_content"               android:layout_height="fill_parent"               android:src="@drawable/new_patient"               />           <ImageView               android:id="@+id/tab3"               android:layout_width="wrap_content"               android:layout_height="fill_parent"               android:src="@drawable/cases"               />           <ImageView               android:id="@+id/tab4"               android:layout_width="wrap_content"               android:layout_height="fill_parent"               android:src="@drawable/config1"               />           </FrameLayout>       </LinearLayout>   </TabHost>

 未完繼續.........

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.