最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android實現(xiàn)給TableLayou繪制邊框的方法

 更新時間:2016年03月10日 11:12:23   作者:yhm2046  
這篇文章主要介紹了Android實現(xiàn)給TableLayou繪制邊框的方法,涉及Android TableLayou布局控制相關(guān)技巧,需要的朋友可以參考下

本文實例講述了Android實現(xiàn)給TableLayou繪制邊框的方法。分享給大家供大家參考,具體如下:

效果如下:

思路:使用share作為背景顯示邊框

步驟

1.在res/drawable文件夾下建立table_frame_gray.xml文件:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle" >
  <solid android:color="#ffffff" />
  <stroke
    android:width="0.01dp"
    android:color="#848484" />
</shape>

2.在布局文件里引用table_frame_gray.xml文件作為背景:

<RelativeLayout 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"
  android:background="#FFFF00"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" >
  <TableLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="#FF4000"
    android:stretchColumns="*"
    android:text="@string/hello_world" >
    <!-- 微博數(shù) -->
    <TableRow>
      <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/table_frame_gray"
        android:orientation="vertical" >
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="232" />
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="微博" />
      </LinearLayout>
      <!-- 關(guān)注人數(shù) -->
      <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/table_frame_gray"
        android:orientation="vertical" >
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="38" />
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="關(guān)注" />
      </LinearLayout>
      <!-- 好友數(shù) -->
      <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/table_frame_gray"
        android:orientation="vertical" >
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="9" />
        <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="5dp"
          android:text="粉絲" />
      </LinearLayout>
    </TableRow>
  </TableLayout>
</RelativeLayout>

更多關(guān)于Android相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《Android調(diào)試技巧與常見問題解決方法匯總》、《Android開發(fā)入門與進(jìn)階教程》、《Android多媒體操作技巧匯總(音頻,視頻,錄音等)》、《Android基本組件用法總結(jié)》、《Android視圖View技巧總結(jié)》、《Android布局layout技巧總結(jié)》及《Android控件用法總結(jié)

希望本文所述對大家Android程序設(shè)計有所幫助。

相關(guān)文章

  • Android自定義模擬時鐘控件

    Android自定義模擬時鐘控件

    這篇文章主要為大家詳細(xì)介紹了Android自定義模擬時鐘控件,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下<BR>
    2022-01-01
  • Android4.4新增函數(shù)訪問外部存儲

    Android4.4新增函數(shù)訪問外部存儲

    這篇文章主要介紹了Android4.4新增函數(shù)訪問外部存儲的相關(guān)資料,非常不錯具有參考借鑒價值,需要的朋友可以參考下
    2016-10-10
  • 點(diǎn)擊微信內(nèi)網(wǎng)頁a標(biāo)簽直接跳轉(zhuǎn)打開淘寶APP的方法實例

    點(diǎn)擊微信內(nèi)網(wǎng)頁a標(biāo)簽直接跳轉(zhuǎn)打開淘寶APP的方法實例

    這篇文章主要給大家介紹了關(guān)于如何實現(xiàn)點(diǎn)擊微信內(nèi)網(wǎng)頁a標(biāo)簽直接跳轉(zhuǎn)打開淘寶APP的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起看看吧。
    2017-11-11
  • Android AOP注解Annotation詳解(一)

    Android AOP注解Annotation詳解(一)

    這篇文章主要介紹了Android AOP注解Annotation詳細(xì)介紹的相關(guān)資料,Annotation是代碼里的特殊標(biāo)記,這些標(biāo)記可以在編譯、類加載、運(yùn)行時被讀取,并執(zhí)行相應(yīng)的處理,需要的朋友可以參考下
    2017-03-03
  • Android中點(diǎn)擊按鈕啟動另一個Activity及Activity之間傳值問題

    Android中點(diǎn)擊按鈕啟動另一個Activity及Activity之間傳值問題

    這篇文章主要介紹了Android中點(diǎn)擊按鈕啟動另一個Activity及Activity之間傳值問題,本文通過實例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-01-01
  • Android控件系列之Button以及Android監(jiān)聽器使用介紹

    Android控件系列之Button以及Android監(jiān)聽器使用介紹

    Button是各種UI中最常用的控件之一,它同樣也是Android開發(fā)中最受歡迎的控件之一,用戶可以通過觸摸它來觸發(fā)一系列事件,要知道一個沒有點(diǎn)擊事件的Button是沒有任何意義的,因為使用者的固定思維是見到它就想去點(diǎn)
    2012-11-11
  • Android讀取本地圖庫與調(diào)用攝像頭拍攝

    Android讀取本地圖庫與調(diào)用攝像頭拍攝

    這篇文章主要為大家詳細(xì)介紹了Android讀取本地圖庫與調(diào)用攝像頭拍攝,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2018-04-04
  • android播放視頻時在立體聲與單聲道之間切換無變化原因分析及解決

    android播放視頻時在立體聲與單聲道之間切換無變化原因分析及解決

    使用第三方視頻播放器,有立體聲與單聲道之間切換,發(fā)現(xiàn)切換后無作用,原因是由于在HAL層默認(rèn)沒有處理上層發(fā)的stereo 轉(zhuǎn)mono的命令,具體的解決方法如下
    2013-06-06
  • android中Intent傳值與Bundle傳值的區(qū)別詳解

    android中Intent傳值與Bundle傳值的區(qū)別詳解

    本篇文章是對android中Intent傳值與Bundle傳值的區(qū)別進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
    2013-05-05
  • Android實現(xiàn)注冊頁面

    Android實現(xiàn)注冊頁面

    這篇文章主要為大家詳細(xì)介紹了Android實現(xiàn)注冊頁面之監(jiān)聽器,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-04-04

最新評論

嵊泗县| 武威市| 鹤庆县| 阳高县| 剑川县| 衡阳市| 息烽县| 马公市| 鹿邑县| 濮阳县| 渭南市| 德清县| 苍梧县| 宁明县| 奉贤区| 定襄县| 建湖县| 巴彦淖尔市| 萨迦县| 石渠县| 湖南省| 江陵县| 喀喇沁旗| 丹阳市| 栾川县| 临泉县| 铜鼓县| 新化县| 马鞍山市| 牙克石市| 周口市| 邯郸市| 广安市| 五莲县| 阿瓦提县| 保定市| 民权县| 静乐县| 湘潭县| 台南市| 高唐县|