androidコーディングメモ 画面に横線を引く方法 横線を引くのが難しかったので記録を残すことにします。 (1)Layouot.xmlにTextViewを定義する ★layouot.xml <TextView android:id="@+id/textView_line" android:layout_width="fill_parent" android:layout_height="wrap_content" /> (2)res/drawableの下にline.xmlファイルを置く ★line.xml <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:width="3sp" android:color="#CCCCCC" />
![『【android】線を引く』](https://cdn-ak-scissors.b.st-hatena.com/image/square/c6627cca4fdc58e91e9d37c9ec6c2d3b4fce00be/height=288;version=1;width=512/https%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F20110302%2F16%2Fapfull%2Fb5%2F35%2Fp%2Fo0640096011085023624.png)