It's starting to look like your custom title layout is embedded in a container view that does additional padding. Not sure why it would do that, but if that's the case, you may have to request FEATURE_NO_TITLE instead, and then make your custom title part of the your layout.
On Sat, Feb 14, 2009 at 4:44 PM, $§Kalle§$ <[email protected]> wrote: > > Don't worry. I will not try to make my apps like Windows x.x. I just > want to understand the changebale titlebar for the moment ;-) > > Here is the complete layout, which fits to the scrrenshot I mentioned. > I do not think, that the icons caused the problem. > > ###################### > <?xml version="1.0" encoding="utf-8" ?> > > <RelativeLayout > android:id="@+id/RelativeLayout01" > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#ff000099"> > <TextView > android:id="@+id/TextView01" > android:layout_height="wrap_content" > android:text="@string/app_name" > android:textColor="#ffffffff" > android:textStyle="bold" > android:gravity="center_vertical" > android:layout_centerVertical="true" > android:layout_width="wrap_content" /> > <AbsoluteLayout > android:id="@+id/AbsoluteLayout01" > android:layout_width="fill_parent" > android:layout_toRightOf="@+id/TextView01" > android:layout_height="fill_parent"> > <LinearLayout android:id="@+id/LinearLayout01" > android:gravity="right" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <ImageButton > android:id="@+id/ImageButton01" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_gravity="center_vertical" > > android:layout_marginRight="20dip" > android:clickable="true" > > android:background="@drawable/us" /> > <ImageButton > > android:id="@+id/ImageButton02" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_gravity="center_vertical" > > android:layout_marginRight="20dip" > android:clickable="true" > > android:background="@drawable/es" /> > <ImageButton > > android:id="@+id/ImageButton03" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_gravity="center_vertical" > android:clickable="true" > > android:background="@drawable/it" > > android:layout_marginRight="20dip" /> > <ImageButton > > android:id="@+id/ImageButton04" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_gravity="center_vertical" > android:clickable="true" > > android:background="@drawable/fr" /> > </LinearLayout> > </AbsoluteLayout> > </RelativeLayout> > ###################### > > > On 15 Feb., 00:57, Marco Nelissen <[email protected]> wrote: > > On Wed, Feb 11, 2009 at 12:09 PM, $§Kalle§$ <[email protected]> > wrote: > > > > > I am using the following Layout for the titlebar with a blue backround > > > color > > > > > <RelativeLayout > > > android:id="@+id/RelativeLayout01" > > > xmlns:android="http://schemas.android.com/apk/res/android" > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > android:background="#ff000099"> > > > <TextView > > > android:id="@+id/TextView01" > > > android:layout_height="wrap_content" > > > android:text="@string/app_name" > > > android:textColor="#ffffffff" > > > android:textStyle="bold" > > > android:gravity="center_vertical" > > > android:layout_centerVertical="true" > > > android:layout_width="wrap_content"> > > > </TextView> > > > </RelativeLayout> > > > > > In onCreate I got: > > > ... > > > requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); > > > setContentView(R.layout.main); > > > getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, > > > R.layout.title); > > > ... > > > > > With that I get a changed titlebar for my HelloWorlApp, that is fine. > > > But somehow on the left and right side there is some margin and I > > > still can see some Grey from the original titlebar. > > > > > What did I wrong? > > > > Where do the icons next the title string come from? I don't see them in > your > > layout, so there must be something you're doing outside of the posted > code > > and layout that is causing the problem. > > And why on earth are you trying to make your app's title bar look like > > Windows 3.1? ;) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

