本文介绍了如何启用拆分操作栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个具有3个滑动选项卡面板的android应用程序,每个应用程序都会有5个按钮(保存,新建,删除,退出..).

I want to create an android application which has 3 sliding tab panel and each of them will 5 button (save,new,delete,exit..).

我想要的完全是以下内容:

What I want is exactly as follow:

我创建了滑动选项卡面板,并为5个按钮添加了拆分操作栏,但它像普通的拆分操作栏一样工作.我的AndroidManifest.xml是:

I created sliding tab panel.And for 5 button, I added split action bar.But It works as normal split action bar.My AndroidManifest.xml is:

.
  
  • if you want to take the full width and make every button with the same size use in your project weight as in this mine example.

现在让我们进入我的 AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.example.piotr.myapplication"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:windowSoftInputMode="stateVisible|adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

在该文件中,我添加了,因为您只能看到另一行:

In that file I'd added as you can see only one additional line:

         android:windowSoftInputMode="stateVisible|adjustResize">

确保设备键盘不会隐藏我自定义的底部工具栏.

to make sure that device keyboard won't hide my custom bottom toolbar.

来自:如何添加底部Android活动菜单

如果您有任何疑问,请随时提问.

If you have any question please free to ask.

希望有帮助

这篇关于如何启用拆分操作栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 14:25