Skip to content

Commit

Permalink
Actionbar layout height reverted to wrap_content, allowing Action Ite…
Browse files Browse the repository at this point in the history
…ms to be styled for appearance

Also introduce an ActionBarItem style that sizes for content, and removes padding and margin, permitting a bar-size drawable
  • Loading branch information
ohhorob committed Jan 26, 2011
1 parent d7b2115 commit 9e357cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 7 additions & 7 deletions actionbar/res/layout/actionbar.xml
Expand Up @@ -16,14 +16,14 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/screen"
android:layout_width="fill_parent"
android:layout_height="45dip"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/actionbar_background"
>
<RelativeLayout
android:id="@+id/actionbar_home"
android:layout_width="wrap_content"
android:layout_height="45dip"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
Expand All @@ -40,7 +40,7 @@
<RelativeLayout
android:id="@+id/actionbar_home_bg"
android:layout_width="wrap_content"
android:layout_height="45dip"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
Expand All @@ -50,20 +50,20 @@
<!-- TODO: Make configurable. -->
<ImageButton
android:id="@+id/actionbar_home_btn"
android:layout_width="45dip"
android:layout_height="45dip"
style="@style/ActionBarItem"
android:background="@drawable/actionbar_btn"
android:padding="5dip"
android:layout_marginRight="1px"
/>
</RelativeLayout>

<LinearLayout
android:id="@+id/actionbar_actions"
android:layout_width="wrap_content"
android:layout_height="45dip"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_margin="0dp"
android:padding="0dp"
android:background="@color/actionbar_separator"
>
</LinearLayout>
Expand Down
6 changes: 6 additions & 0 deletions actionbar/res/values/styles.xml
Expand Up @@ -20,4 +20,10 @@
<item name="android:orientation">horizontal</item>
<item name="android:background">@drawable/actionbar_background</item>
</style>
<style name="ActionBarItem">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:padding">0dp</item>
<item name="android:layout_margin">0px</item>
</style>
</resources>

0 comments on commit 9e357cb

Please sign in to comment.