ide/androidstudio

Circle TextView

C/H 2017. 1. 16. 08:00

drawable/round.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="@color/boll" />
    <size
        android:height="60dp"
        android:width="60dp" />
</shape>

layout/somthing.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">


    <TextView
        android:text="01"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:textSize="30dp"
        android:textStyle="normal|bold"
        android:gravity="center"
        android:textColor="@color/boll_text"
        android:background="@drawable/boll"
        tools:ignore="HardcodedText,SpUsage" />

</LinearLayout>
반응형

'ide > androidstudio' 카테고리의 다른 글

Android Drawable Shape Syntax  (0) 2017.01.18
android SQLite DB 열기  (0) 2017.01.17
orma "transformClasses With New Class Shrinker For Debug"  (0) 2017.01.12
Android ORM  (0) 2017.01.11
RxBrite Android-Orma  (0) 2017.01.10