Click here to Skip to main content
15,893,663 members
Articles / Mobile Apps / Android

Drawing in Android

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
29 Nov 2012CPOL10 min read 30.5K   965   13  
2D Drawing in Android
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent">
    <CheckBox android:text="Draw rectangle" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLDrawRectangle" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="Draw line" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLDrawLine" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="Draw oval" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLDrawOval" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="Draw ring" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLDrawRing" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="Set bounds" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLSetBounds" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="As ShapeDrawable" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLAsShapeDrawable" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
    <CheckBox android:text="As GradientDrawable" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/checkBoxInXMLAsGradientDrawable" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox>
</LinearLayout>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Belgium Belgium
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions