配售我的动作条在底部 [英] Placing my ActionBar at the bottom
问题描述
我也跟着教程让其他动作在我的应用程序。但是,即使当我把安卓uiOptions =splitActionBarWhenNarrow
在我的清单文件仍保持它在顶部。任何人有什么做这个code什么想法?
XML:
< LinearLayout中的xmlns:机器人=http://schemas.android.com/apk/res/android
的xmlns:工具=http://schemas.android.com/tools
机器人:layout_width =match_parent
机器人:layout_height =match_parent
机器人:方向=垂直
机器人:后台=#F0F0F0
机器人:baselineAligned =假>
<的LinearLayout
机器人:ID =@ + ID / myFragments
机器人:layout_width =match_parent
机器人:layout_height =0dp>
< / LinearLayout中>
< / LinearLayout中>
清单文件:
<舱单的xmlns:机器人=http://schemas.android.com/apk/res/android
包=com.example.alotoftesting
安卓版code =1
机器人:VERSIONNAME =1.0>
<用途-SDK
安卓的minSdkVersion =11
机器人:targetSdkVersion =15/>
<应用
机器人:图标=@可绘制/ ic_launcher
机器人:标签=@字符串/ APP_NAME
机器人:主题=@风格/ AppTheme>
<活动
机器人:名称=。MainActivity
机器人:标签=@字符串/ title_activity_main
机器人:uiOptions =splitActionBarWhenNarrow>
<意向滤光器>
<作用机器人:名称=android.intent.action.MAIN/>
<类机器人:名称=android.intent.category.LAUNCHER/>
&所述; /意图滤光器>
< /活性GT;
< /用途>
< /舱单>
在谷歌的默认操作栏不会在任何情况下,在底部出现。因为它似乎其他人所说的, splitActionBarWhenNarrow
只放的一个子集的动作条
(如标签等)在底部屏幕时,该设备是窄的。不幸的是,如果你想实现像在屏幕的底部接口的动作条,你就必须实现它自己(的快速搜索找到这个例子),因为我还没有看到任何图书馆这样做给你。
在所有的,不过,我不推荐它,因为它违反了href="http://developer.android.com/guide/practices/seamlessness.html">无缝设计原则的 I followed a tutorial on getting actionbars in my app. But even when I put XML: Manifest File:
The google default action bar does not in any case appear on the bottom. As it seems others have mentioned, In all, though, I would recommend against it, as it violates the Seamlessness design principle in the design documents by breaking user expectations of where ActionBar type controls will be - An android user is ideally used to doing things a certain way, and you would need a pretty compelling reason to break that expectation. 这篇关于配售我的动作条在底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!android:uiOptions="splitActionBarWhenNarrow"
in my Manifest file it still keeps it at the top. Anyone has any ideas on what to do with this code?<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#f0f0f0"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/myFragments"
android:layout_width="match_parent"
android:layout_height="0dp">
</LinearLayout>
</LinearLayout>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.alotoftesting"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
splitActionBarWhenNarrow
only puts a subset of your ActionBar
(like tabs, etc) on the bottom of the screen when the device is narrow. Unfortunately, if you want to implement an ActionBar like interface on the bottom of the screen, you'll have to implement it yourself (a quick search finds this example), as I haven't seen any Libraries to do this for you.