這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)碛嘘P(guān)Android開發(fā)中怎么實(shí)現(xiàn)一個(gè)全文收起功能,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
首先寫一個(gè)布局,這個(gè)布局是每個(gè)子項(xiàng)的布局 item_text_list.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:orientation="horizontal"> <TextView android:id="@+id/tv_hend" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginRight="16dp" android:background="@drawable/circle" android:gravity="center" android:text="1" android:textColor="@android:color/white" android:textSize="14sp" /> <TextView android:id="@+id/tv_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.87" android:text="丁先森" android:textColor="@android:color/black" android:textSize="14sp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="56dp" android:orientation="vertical" android:paddingBottom="8dp"> <TextView android:id="@+id/tv_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:alpha="0.85" android:ellipsize="end" android:text="" android:textColor="@android:color/black" android:textSize="14sp" /> <TextView android:id="@+id/tv_expand_or_collapse" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="全文" android:textColor="@color/colorPrimaryDark" android:textSize="14sp" /> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="0.5dp" android:layout_marginLeft="56dp" android:alpha="0.12" android:background="@android:color/black" /> </LinearLayout>
新聞標(biāo)題:Android開發(fā)中怎么實(shí)現(xiàn)一個(gè)全文收起功能-創(chuàng)新互聯(lián)
瀏覽路徑:http://www.rwnh.cn/article12/cesogc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動(dòng)態(tài)網(wǎng)站、做網(wǎng)站、網(wǎng)站內(nèi)鏈、自適應(yīng)網(wǎng)站、靜態(tài)網(wǎng)站、小程序開發(fā)
聲明:本網(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)
猜你還喜歡下面的內(nèi)容