Android 与多个活动链接的自定义标题栏
大家好,我为我的应用程序制作了一个自定义标题栏。我想知道这是不是太多的代码只是一个标题栏。我问这个问题的原因是我想参加一个小组活动,但我不喜欢tab host,因为我试过了,但我不喜欢。所以我喜欢一个标题栏而不是标签Android 与多个活动链接的自定义标题栏,android,custom-titlebar,Android,Custom Titlebar,大家好,我为我的应用程序制作了一个自定义标题栏。我想知道这是不是太多的代码只是一个标题栏。我问这个问题的原因是我想参加一个小组活动,但我不喜欢tab host,因为我试过了,但我不喜欢。所以我喜欢一个标题栏而不是标签 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" an
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/pt5"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="match_parent"
android:layout_height="50dp" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" android:background="@drawable/tilte2">
<Button
android:id="@+id/button1"
android:layout_width="108dp"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@null" android:drawableBottom="@drawable/info_btn"/>
<Button
android:id="@+id/button3"
android:layout_width="105dp"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="@null" android:drawableBottom="@drawable/car_key"/>
<Button
android:id="@+id/button2"
android:layout_width="105dp"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button3"
android:background="@null" />
</RelativeLayout>
</FrameLayout>
谢谢你TabActivity是Android的一个有用的功能。如果你不想使用它,如果你想定制tab bar,你可以创建一个抽象活动并在其中创建一个tab bar,然后在任何你想使用tab bar的活动中扩展这个抽象类
这是可以作为选项卡栏选项使用的选项。我知道我做了什么。但是我很喜欢这个电台的样子谢谢你,达曼德拉