Skip to content

Commit

Permalink
Initial support for NAVIGATION_MODE_TABS.
Browse files Browse the repository at this point in the history
  • Loading branch information
johannilsson committed May 16, 2011
1 parent 5e3d1ba commit 26c0462
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 21 deletions.
5 changes: 5 additions & 0 deletions actionbar/res/drawable/actionbar_tab.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke android:color="#FFFFFF" />
<size android:height="1dp" />
</shape>
22 changes: 22 additions & 0 deletions actionbar/res/layout/actionbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,28 @@
android:focusable="true"
android:visibility="gone"
/>
<LinearLayout
android:id="@+id/actionbar_tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/actionbar_progress"
android:background="@drawable/actionbar_btn"
android:focusable="true"
android:visibility="visible"
android:orientation="horizontal"
android:gravity="center_vertical"
>
</LinearLayout>
<!-- TODO: Make configurable. -->
<View
android:id="@+id/actionbar_tabs_bottom_line"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="2dip"
android:background="#FFFFFF"
android:layout_alignParentBottom="true"
/>
<ImageView
android:id="@+id/actionbar_list_indicator"
android:layout_width="wrap_content"
Expand Down
37 changes: 37 additions & 0 deletions actionbar/res/layout/actionbar_tab.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Johan Nilsson <http://markupartist.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_alignParentLeft="true"
android:layout_weight="1"
>
<TextView
android:id="@+id/actionbar_tab"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:padding="5dip"
/>
<!-- TODO: Make configurable. -->
<View
android:id="@+id/actionbar_tab_selected"
android:layout_width="wrap_content"
android:layout_height="5dip"
android:background="#FFFFFF"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
Loading

0 comments on commit 26c0462

Please sign in to comment.