使用下面4.4 Vuforia版本时,工具栏消失 [英] Toolbar disappears when using Vuforia versions below 4.4

查看:198
本文介绍了使用下面4.4 Vuforia版本时,工具栏消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的SDK Vuforia和4.4版本的设备上测试下面的工具栏消失,菜单按钮是有,但看不见的地方将是正确的按钮可见。
与recyclerview我使用侧面菜单按钮drawerlayout不工作版本4.4以下,其图标消失。随着多的努力可以刷卡激活侧面菜单。上面这个版本的菜单功能和按钮的显示方式。
以下图片并纠正问题和xml布局。

I am using the SDK Vuforia and testing on devices with version 4.4 below the toolbar disappears, the menu buttons are there but invisible where would be the correct buttons are visible. The drawerlayout button with recyclerview I use the side menu does not work in version below 4.4, and its icon disappears. With much effort can swipe to activate the side menu. Above this version of the menu functions and buttons are displayed. The following images and correct the problem and xml layouts.

在这里输入的形象描述

在这里输入的形象描述

camera_overlay.xml

camera_overlay.xml

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_centerInParent="true">

    <ImageView
        android:id="@+id/ivLoading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@anim/loading"/>

    <TextView
        android:id="@+id/tvLoading"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/loading"
        android:textSize="23sp"
        android:textStyle="bold"
        android:textColor="@color/primary_dark"
        android:gravity="center_horizontal"
        android:layout_marginTop="43dp" />

</LinearLayout>

</RelativeLayout>

toolbar.xml

toolbar.xml

<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    android:fitsSystemWindows="true"
    android:elevation="4dp"
    app:theme="@style/CustomActionBar"/>

main_activity.xml

main_activity.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/DrawerLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:elevation="7dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <include
            android:id="@+id/toolbar"
            layout="@layout/toolbar">
        </include>

        <FrameLayout
            android:id="@+id/fragContainer"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:tag="fragContainer" />

    </LinearLayout>

    <RelativeLayout
        android:layout_width="320dp"
        android:layout_height="match_parent"
        android:layout_gravity="start">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/RecyclerView"
            android:layout_width="320dp"
            android:layout_height="fill_parent"
            android:layout_gravity="left"
            android:fitsSystemWindows="true"
            android:background="@color/primary"
            android:scrollbars="vertical">

        </android.support.v7.widget.RecyclerView>

        <LinearLayout
            android:id="@+id/footer_menu"
            android:layout_width="320dp"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:orientation="horizontal" >

            <ImageView
                android:id="@+id/ivFooter"
                android:layout_width="wrap_content"
                android:layout_height="35dp"
                android:layout_gravity="bottom|center"
                android:layout_margin="5dp"/>

        </LinearLayout>

    </RelativeLayout>

</android.support.v4.widget.DrawerLayout>

编辑2015年10月16日

我做的<一个通话href=\"https://developer.vuforia.com/forum/android/drawer-and-toolbar-disappear-lower-versions-lollipop#comment-2059389\"相对=nofollow> Vuforia论坛,看看是否有人有可能帮助我......包容性有一个测试项目,以促进问题的位置。

Edited 10/16/2015

I made a call on Vuforia forum to see if someone there could help me ... Inclusive has a test project to facilitate the location of the problem.

推荐答案

链路,所述溶液被发现。问题是组织在屏幕上的对象。有了这个下面code可以发挥,在preVIEW镜头前消失的元素。

As this link, the solution was found. The problem was organize the objects on the screen. With this following code could play the elements that disappeared in front of the preview camera.

这篇关于使用下面4.4 Vuforia版本时,工具栏消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆