欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Android使用Gridview單行橫向滾動(dòng)顯示-創(chuàng)新互聯(lián)

本文實(shí)例為大家分享了Android使用Gridview單行橫向滾動(dòng)顯示的具體代碼,供大家參考,具體內(nèi)容如下

成都創(chuàng)新互聯(lián)始終堅(jiān)持【策劃先行,效果至上】的經(jīng)營(yíng)理念,通過多達(dá)十余年累計(jì)超上千家客戶的網(wǎng)站建設(shè)總結(jié)了一套系統(tǒng)有效的營(yíng)銷推廣解決方案,現(xiàn)已廣泛運(yùn)用于各行各業(yè)的客戶,其中包括:塔吊租賃等企業(yè),備受客戶贊賞。

要想實(shí)現(xiàn)滾動(dòng)顯示,layout布局里必須要使用HorizontalScrollView,才能實(shí)現(xiàn)橫向滑動(dòng),但HorizontalScrollView標(biāo)簽里要嵌套一個(gè)LinearLayout布局

activity_main.xml,如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 tools:context=".MainActivity"
 android:orientation="vertical"
 android:weightSum="2" >

 <HorizontalScrollView
  android:id="@+id/horizontal_scrollview"
  android:layout_height="0dp"
  android:layout_width="fill_parent"
  android:layout_weight="1"
  android:layout_gravity="center"
  android:background="@android:color/darker_gray"
  android:scrollbars="none">
   <LinearLayout
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    android:orientation="horizontal">
     <GridView
      android:id="@+id/test_gridview"
      android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"/>
   </LinearLayout>
 </HorizontalScrollView>
</LinearLayout>

當(dāng)前題目:Android使用Gridview單行橫向滾動(dòng)顯示-創(chuàng)新互聯(lián)
分享路徑:http://chinadenli.net/article0/dggjio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、網(wǎng)站設(shè)計(jì)外貿(mào)建站、Google、企業(yè)網(wǎng)站制作建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化