Multiple Gravity in XML

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Multiple Gravity in XML

Postby mharkus » Fri Dec 05, 2008 8:29 am

Hi folks,

I just want to ask if it is possible to have something like this to be done in XML?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Basically, I want my component to be centered vertically and at the same time be placed at the left most part of the view.

Thanks in advance.


Cheers,
Marc
mharkus
Freshman
Freshman
 
Posts: 4
Joined: Thu Oct 09, 2008 11:22 am
Location: Philippines

Top

Re: Multiple Gravity in XML

Postby Jay » Fri Dec 05, 2008 10:41 am

mharkus wrote:Hi folks,

I just want to ask if it is possible to have something like this to be done in XML?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Basically, I want my component to be centered vertically and at the same time be placed at the left most part of the view.

Thanks in advance.


Cheers,
Marc


Absolutely yes ,
android:layout_gravity="left|center_vertical"

Regards,
Jay
Jay
Developer
Developer
 
Posts: 28
Joined: Wed Apr 23, 2008 3:51 am

Postby mharkus » Fri Dec 05, 2008 10:44 am

cool thanks jay...
mharkus
Freshman
Freshman
 
Posts: 4
Joined: Thu Oct 09, 2008 11:22 am
Location: Philippines

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests