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. [WTI] Ncis jadi lady gadget

Wew kereeen...

Mantab ncis



-- 
===============

2. Nexian Journey Users, here comes a new version of Apanda

Apakah ini Journey 2 ya? 
Lagi development kan denger2 di Nexian?

CMIIW. 

B/Rgds, 
Bambang S. Pranoto (Yongky)
@Bambang_Yongky ; GTalk bambang.yongky

-----Original Message-----
From: "Marwana, I.B.Pt .: biMp :." <bimp.marw...@gmail.com>
Sender: id-android@googlegroups.com
Date: Thu, 24 Feb 2011 09:59:07 
To: <id-android@googlegroups.com>
Reply-To: id-android@googlegroups.com
Subject: [id-android] Nexian Journey Users, here comes a new version of Apanda

Nexian Journey A890 kan satu species sama Apanda A60, nah sekarang 
Apanda ngeluarin gadget baru yang semoga saja diadopsi lagi sama merk 
"lokal".

Produsen ponsel China Apanda merilis produk ponsel pintar Apanda A100 
yang menggunakan sistem operasi Android Gingerbread. Ini berarti bahwa 
OS pada ponsel ini sama dengan Google Nexus S yang dibuat oleh Samsung.

Pada awalnya prototype dari perangkat ini memang hanya menggunakan 
Android 2.2 Froyo namun pada saat mulai dipasarkan nanti perangkat ini 
akan menggunakan Android 2.3 Gingerbread.

Dari informasi yang kami peroleh, perangkat ini diotaki dengan prosesor 
Snapdragon QSD8650 1GHz, ROM 2GB, RAM 512MB, Layar kapasitif berukuran 
4.3 inch dengan resolusi 480 x 800 piksel serta baterai dengan kapasitas 
1400 mAh. Tidak lupa juga kamera 5 megapiksel yang mampu merekam video 
HD 720p dan port 3.5 mm untuk jack audio.

-- 
Regards,


-biMp-

-- 
===============


-- 
===============

3. Android 3.0 SDK Beredar

4. Motorola Atrix 4G Promosi di 30 Video YouTube

5. Call Blocker & SMS Blocker untuk Android

6. 绛斿: Android HAL code debug

7. Protecting copyright of my android application