Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Created May 17, 2014 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akexorcist/96e99bc932e5b44e683c to your computer and use it in GitHub Desktop.
Save akexorcist/96e99bc932e5b44e683c to your computer and use it in GitHub Desktop.
ตอบคำถามใน Android Developer [Google Plus] https://plus.google.com/+JulianoNunesSilvaOliveira/posts/j9WJWvMWAMA
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<solid android:color="@color/light_green" />
</shape>
<?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="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/circle_dimen"
android:layout_weight="1"
android:background="@color/dark_green"
android:gravity="center_vertical"
android:padding="@dimen/text_padding" >
<TextView
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Text"
android:textColor="@color/light_green"
android:textSize="@dimen/text_size" />
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:textColor="@color/light_green"
android:textSize="@dimen/text_size" />
</LinearLayout>
<TextView
android:id="@+id/text3"
android:layout_width="@dimen/circle_dimen"
android:layout_height="@dimen/circle_dimen"
android:layout_margin="@dimen/text_margin"
android:background="@drawable/circle_bg"
android:gravity="center"
android:padding="@dimen/text_padding"
android:text="5"
android:textColor="@color/black"
android:textSize="@dimen/text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/circle_dimen"
android:layout_weight="1"
android:background="@color/dark_green"
android:gravity="center_vertical"
android:padding="@dimen/text_padding" >
<TextView
android:id="@+id/text4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Text"
android:textColor="@color/light_green"
android:textSize="@dimen/text_size" />
<TextView
android:id="@+id/text5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"
android:textColor="@color/light_green"
android:textSize="@dimen/text_size" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="dark_green">#468575</color>
<color name="light_green">#d8ea0e</color>
<color name="black">#000000</color>
</resources>
<resources>
<dimen name="circle_dimen">50dp</dimen>
<dimen name="text_padding">10dp</dimen>
<dimen name="text_margin">2dp</dimen>
<dimen name="text_size">18sp</dimen>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment