Results 1 to 1 of 1
  1. #1
    Arnold is offline Member
    Join Date
    Oct 2009
    Location
    Rotterdam
    Posts
    52
    Rep Power
    0

    Lightbulb Rounded Rectangle

    Hi

    Is there a way to turn the rectangular view in the attachment into a nice rounded rectangle. Actually it's two rounded rectangles (one in the other).
    The XML that generates this view is as follows:
    XML Code:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
    	xmlns:android="http://schemas.android.com/apk/res/android"
    	android:layout_width="wrap_content"
    	android:orientation="horizontal"
    	android:layout_margin="5px"
    	android:background="#999"
    	android:layout_height="50px"
    	android:gravity="center_vertical"
    	>
    	<TextView
    		android:textColor="#000"
    		android:layout_height="fill_parent"
    		android:layout_width="100px"
    		android:gravity="center_vertical"
    		android:text="TextView"
    		>
    	</TextView>
    	<LinearLayout
    		android:layout_width="wrap_content"
    		android:layout_margin="5px"
    		android:background="#666"
    		android:layout_height="30px"
    		android:gravity="center_vertical"
    		>
    		<TextView
    			android:textColor="#FF0"
    			android:layout_height="fill_parent"
    			android:layout_width="75px"
    			android:gravity="center_vertical"
    			android:text="TextView"
    			>
    		</TextView>
    		<ImageView
    			android:layout_width="16px"
    			android:layout_height="16px"
    			>
    		</ImageView>
    	</LinearLayout>
    </LinearLayout>
    The view is meant to be generated by the inflate() method to be placed in a larger view.

    I tried searching for the answer, but the answers are all very confusing.
    I hope it's possible, since the layout would be much nicer this way :D
    Attached Thumbnails Attached Thumbnails Rounded Rectangle-view.jpg  
    Last edited by Arnold; 05-27-2010 at 04:10 PM.

Similar Threads

  1. non-rectangle JPanel
    By itaipee in forum AWT / Swing
    Replies: 4
    Last Post: 04-30-2009, 11:58 PM
  2. Replies: 6
    Last Post: 06-12-2008, 09:14 AM
  3. Rectangle Intersection
    By Gwindow in forum Java 2D
    Replies: 1
    Last Post: 04-24-2008, 03:53 PM
  4. help with rectangle class
    By darkgt in forum New To Java
    Replies: 7
    Last Post: 11-14-2007, 06:19 PM
  5. Rectangle with rounded edges??
    By orchid in forum Java 2D
    Replies: 1
    Last Post: 05-10-2007, 02:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •