自定义标题栏与多发activites链接

自定义标题栏与多发activites链接

本文介绍了自定义标题栏与多发activites链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好人,我已经为我的应用程序自定义标题栏。我想知道这是不是太大code只是一个标题栏。我想问的原因是,我要像一个团队活动,但我不喜欢标签主机,因为我尝试过了,我不喜欢它。所以我喜欢一个标题栏,而不是制表主机

Hello people I have made a custom title bar for my app. I would like to know if this is not to much code just for a title bar. the reason I ask is that I want like a group activity but I don't like tab-host because I tried it and I didn't like it. so I like a title-bar instead of tab-host

      <?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.If的有用的功能之一,如果你想进行自定义标签栏则可以创建一个抽象的活动,并在创建一个标签栏,之后你要使用的标签栏,你可以什么都活动扩展了抽象类。

TabActivity is the one of the usefull feature of the Android.If you don't want to use it and if you want to make custom tab-bar then you can create one abstract activity and create a tab-bar in that and after that in what ever activity you want to use the tab-bar you can extends that abstract class.

下面是您可以参考作为标签栏的选项。

Here is the link which you can refer as a option of tab-bar.

这篇关于自定义标题栏与多发activites链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 01:40