I've checked out their code but when I use the same code in my app I
still get the outline from the title bar coming through. This is the
xml for the title bar:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/i_title_gradient"
>
        <Button
                android:id="@+id/title_left_btn"
            android:layout_width="75dip"
            android:layout_height="wrap_content"
            style="@style/iBtn"
        />
        <TextView
                android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
                android:textSize="20dip"
            android:textStyle="bold"
            android:textColor="#ddd"
            android:layout_gravity="center"
            android:gravity="center"
            android:paddingLeft="8dip"
            android:paddingRight="8dip"
        />
        <Button
                android:id="@+id/title_right_btn"
            android:layout_width="75dip"
            android:layout_height="wrap_content"
            style="@style/iBtn"
        />
</LinearLayout>

And this is where I call it in the app:

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
          setContentView(R.layout.main);
          getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.i_title);

This is the code for layout.main

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android";
android:id="@+id/RelativeLayout20"

android:windowNoTitle="true" android:layout_height="fill_parent"
android:layout_width="fill_parent">

<ListView android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android";
android:background="@drawable/possiblebackground1"
android:id="@android:id/list" style="@style/MyListView"
android:keepScreenOn="false"
android:drawSelectorOnTop="true"
android:listSelector="@drawable/listselector"
android:windowNoTitle="true">


</ListView>

</RelativeLayout>


The only difference between their one and mine is that I use a
relative layout and they use a linear layout. Could that make a
difference? Any suggestions welcome.


Thanks

On Jun 10, 4:51 am, iDeveloper <[email protected]> wrote:
> Check out this 
> linkhttp://code.google.com/p/android-misc-widgets/source/browse/#svn/
> trunk/android-misc-widgets
> They make very good use of styles and themes to create acustomtitle 
> bar. And it works great.
>
> On 09-Jun-09, at 9:50 PM, Rick wrote:
>
>
>
> > I'm setting up an app to use acustomtitleso I can get the proper
> > logo into thetitleinstead of just text, and to make it clean (since
> > the logo has a flat black background), I also want the wholetitlebar
> > to be black. My xml for thetitleis a framelayout to hold the logo
> > inside of a linearlayout to change the background color, and I'm
> > setting thetitlein OnCreate() as follows:
>
> >    protected void onCreate(Bundle savedInstanceState){
> >            super.onCreate(savedInstanceState);
> >        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
> >        setContentView(R.layout.main);
> >        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
> > R.layout.title);
> >    }
>
> > With this setup, the old gray from the oldtitlebar still exists
> > around the edge of mycustomtitle. Appears to be on the order of 3-4
> > px on the bottom and 8-10 px on each side. Any ideas about how to get
> > the black background to cover the entire area?
>
> > Thanks
>
> > -Rick

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to