内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

學習使用MaterialDesign控件(三)使用CardView實現(xiàn)卡片效果

本文主要介紹CardView的使用,CardView是繼承自FrameLayout,使用比較簡單,只需要用CardView包含其他View就可以實現(xiàn)卡片效果了。

創(chuàng)新互聯(lián)建站一直在為企業(yè)提供服務,多年的磨煉,使我們在創(chuàng)意設計,全網(wǎng)整合營銷推廣到技術研發(fā)擁有了開發(fā)經(jīng)驗。我們擅長傾聽企業(yè)需求,挖掘用戶對產(chǎn)品需求服務價值,為企業(yè)制作有用的創(chuàng)意設計體驗。核心團隊擁有超過10多年以上行業(yè)經(jīng)驗,涵蓋創(chuàng)意,策化,開發(fā)等專業(yè)領域,公司涉及領域有基礎互聯(lián)網(wǎng)服務服務器托管成都APP應用開發(fā)、手機移動建站、網(wǎng)頁設計、網(wǎng)絡整合營銷。

實現(xiàn)效果如下:

學習使用Material Design控件(三)使用CardView實現(xiàn)卡片效果

加入依賴庫

dependencies {
  ….
  compile 'com.android.support:cardview-v7:22.2.0'
}

Layout布局

 <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="10dp"
        app:cardElevation="10dp"
        android:layout_marginBottom="@dimen/card_margin"
        android:layout_marginLeft="@dimen/card_margin"
        android:layout_marginRight="@dimen/card_margin">

        <LinearLayout
          
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal">

          <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/book1" />

          <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:orientation="vertical">

            <TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="@string/book_title_1"
              android:textAppearance="@style/TextAppearance.AppCompat.Title"
              android:textColor="@color/primary_text" />

            <TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="2dp"
              android:text="@string/book_description_1"
              android:textColor="@color/secondary_text" />
          </LinearLayout>

        </LinearLayout>

</android.support.v7.widget.CardView>

app:cardBackgroundColor 設置CardView背景顏色
app:cardCornerRadius 設置CardView圓角大小
app:cardElevation 設置CardView陰影高度

項目源碼已發(fā)布到Github,以后慢慢加入其他控件的使用。
 源碼地址:MaterialDesignExample

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。

網(wǎng)站標題:學習使用MaterialDesign控件(三)使用CardView實現(xiàn)卡片效果
文章位置:http://www.rwnh.cn/article38/ihjdsp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、網(wǎng)站內(nèi)鏈、網(wǎng)站設計公司、響應式網(wǎng)站、做網(wǎng)站定制網(wǎng)站

廣告

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

成都網(wǎng)頁設計公司
磐石市| 望都县| 嘉祥县| 南涧| 漳州市| 富阳市| 克什克腾旗| 乐安县| 南康市| 苍梧县| 平湖市| 九寨沟县| 河东区| 内丘县| 安塞县| 南开区| 泽普县| 来安县| 昭苏县| 中宁县| 清远市| 兴化市| 正定县| 彭山县| 会东县| 阳西县| 郎溪县| 睢宁县| 东阿县| 汤阴县| 若羌县| 长岭县| 浦江县| 九龙县| 开远市| 永州市| 罗城| 潜山县| 双城市| 璧山县| 乌兰察布市|