The example uses the way of creating extending class, I know that could accomplish this, I have statemented that I want to see if somebody know a light way. The rotating method is contained in the layout xml. Thank you anyway to pay your attention .
On Monday, May 13, 2013 3:05:05 PM UTC+8, Piren wrote: > you never said how you rotated it... > > either way, you could have spent this week googling instead of crying out > for help and bumping the topic. > it took me less than 5 seconds to find this: > > http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android > > On Monday, May 6, 2013 4:35:31 AM UTC+3, zhiyazw wrote: >> >> This is still not resolved, pls someone help. >> >> On Apr 26, 4:10 pm, zhiyazw <zhiy...@gmail.com> wrote: >> > See the layout xml: >> > >> > <LinearLayout xmlns:tools="http://schemas.android.com/tools" >> > android:layout_width="match_parent" >> > android:layout_height="match_parent" >> > android:orientation="vertical" >> > tools:context=".MainActivity" xmlns:android=" >> http://schemas.android.com/apk/res/android"> >> > >> > <TextView >> > android:layout_width="wrap_content" >> > android:layout_height="wrap_content" >> > android:layout_gravity="center_horizontal" >> > android:layout_marginBottom="10dp" >> > android:layout_marginTop="10dp" >> > android:text="Temperature Chart" >> > android:textAppearance="?android:attr/textAppearanceLarge" /> >> > >> > <LinearLayout >> > android:id="@+id/chartContainer" >> > android:layout_width="match_parent" >> > android:layout_height="wrap_content" > >> > >> > <TextView >> > android:id="@+id/textTemperature" >> > android:layout_width="wrap_content" >> > android:layout_height="wrap_content" >> > android:layout_gravity="center_vertical" >> > android:transformPivotX="0sp" >> > android:translationY="0sp" >> > android:rotation="-90" >> > android:text="Temperature" /> >> > >> > </LinearLayout> >> > </LinearLayout> >> > >> > then I insert a chart view into the "chartContainer" LinearLayout. The >> > executing result is as the following picture: >> > you can see the problem is, after "textTemperature" is rotated, it >> still >> > occupy the room as before it rotated, bellow layout view confirmed >> this. >> > >> > < >> https://lh4.googleusercontent.com/-qw0ryGAA_6A/UXo1t4C2RjI/AAAAAAAAAA...> >> >> > >> > My question is how can I make the "textTemperature" widget only occupy >> the >> > width as it is looked like? that's, there is no additional blank >> between >> > "textTemperature" and the chart. >> > I know writing a customized widget or putting the rotated widget in an >> > individual FrameLayout could accomplish this, I mean to seek there is >> any >> > lighter way, such as a property, etc. >> > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.