Defining an XML vertical line drawable

by Caspa » Mon, 19 Apr 2010 04:09:09 GMT


Sponsored Links
 Hello,

I'm trying to figure out how to define a verical line (1px thick) to
be used as a drawable.

to make a horizontal one, it's pretty straightforward:

<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;
android:shape="line">
    <stroke android:width="1dp" android:color="#0000FF"/>
    <size android:height="50dp" />
</shape>

The question is, how to make this line vertical?

Yes, there are workarounds, such as drawing a rectangle shape 1px
thick, but that complicates the drawable xml, if it consists of
multiple <item> elements.

Anyone had any chance with this?

--



Defining an XML vertical line drawable

by patbenatar » Mon, 19 Apr 2010 17:37:55 GMT


 You could use a 1x1 Nine-Patch PNG....






>


Sponsored Links


Defining an XML vertical line drawable

by Caspa » Tue, 20 Apr 2010 23:49:39 GMT


 Thanks for the suggestion patbenatar!

I'm aware I could go for a 1px png drawable or draw the vertical line
as a View etc.

However since there is a "line" shape, I assume there is a way of
drawing it vertically, or at least there SHOULD be.

Can anyone confirm this being possible / not possible?

Kacper




> >



Defining an XML vertical line drawable

by patbenatar » Wed, 21 Apr 2010 03:29:46 GMT


 Yea my idea is largely a hack... Always better to confirm no standard
method exists before pursuing hacks :)







> > >



Other Threads

1. How to change the screen resolution.

Hi Sir,

I'm porting Android to our hardware with 320x240 LCD.
The Android resolution is too high, so that the icons and messages on
the desktop is too small to be recognized.
How can I configure the resolution of screen to proper size?

Thank you for your great help.

Best Regards,
YJ
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Andorid's marketing campaign ...

Compare these two commercials :

http://www.youtube.com/watch?v=Y4795KVt_kw
http://www.youtube.com/watch?v=3JJkckrO7-s

Which phone would you buy if all you knew about them was from these
two commercials?


--~--~---------~--~----~------------~-------~--~----~

3. TabActivity in Theme Light

4. problem with webview - unable to open database file HELP

5. Access the environment variable in java layer

6. Class Cast Exception after classLoader.loadClass() and newInstance!

7. Pop up