Android的 - 状态栏有时隐藏的视图部分 [英] Android - Status bar hides part of view sometimes

查看:152
本文介绍了Android的 - 状态栏有时隐藏的视图部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有previously问过这个问题,但没有得到任何解决方案。

Hi I have previously asked this question but didnt get any solution.

我有以下问题与Galaxy Nexus的运行Android 4.2。

I have following problem with Galaxy nexus running android 4.2.

我使用的相机意图拍照。如果我捕捉PIC在横向模式下,返回到活动(活动是在纵向模式下使用安卓清单中screenOrientation =肖像)的状态栏隐藏的视图。它运作良好,如果PIC是采取纵向模式。

I am using camera intent to take photo. If I capture pic in landscape mode and return to activity(activity is in portrait mode with android:screenOrientation="portrait" in manifest) the status bar hides the view. It works well if pic is taken in portrait mode.

这种情况只有与像 Galaxy Nexus的索尼Xperia新某些设备。我测试了 HTC渴望三星王牌设备效果很好。

This happens only with certain devices like Galaxy Nexus and Sony Xperia Neo . I tested it on htc Desire and Samsung Ace device it works well.

请大家帮帮忙。

查看后面的状态栏

View behind status bar

而要求

whereas required

编辑: 布局的xml:

layout xml:

<?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="@color/signup_bg"
android:orientation="vertical" >
<include
    android:layout_width="match_parent"
    android:layout_height="@dimen/abs__action_bar_default_height"
    layout="@layout/titlebar_account" />
<ScrollView
    android:id="@+id/editAccountScrollView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >
    <LinearLayout
        android:id="@+id/editAccountLinearLayout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" >
        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:layout_marginTop="16dp"
            layout="@layout/signup_basic" />
        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/signup_home_base" />
        <TextView
            android:id="@+id/textView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:paddingBottom="12dp"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingTop="10dp"
            android:text="@string/account_about_me"
            android:textColor="@color/account_headings" />
        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            layout="@layout/edit_account_email_about_me" />
        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/edit_account_social" />
    </LinearLayout>
</ScrollView>

推荐答案

这是发生由于照相机API当您启动相机应用它隐藏状态栏,并由于一些问题,状态栏绘制重叠的布局意味着状态栏区域覆盖布局。您可以通过隐藏和显示状态栏上解决这个问题。有什么不对的标题栏。 点击此处查看我的解决办法:<一href="http://stackoverflow.com/questions/15600450/androidlayout-move-upwards-about-20dp-area-from-the-top-hides-behind-the-stat">Android:Layout向上移动和放大器;大约从后面顶皮20dp区状态栏

This is happening due to camera api when you launch camera app it hides the status bar and due to some problem status bar draw overlapping the layout means status bar area covers the layout. you can fix this by hiding and showing the status bar. there is nothing wrong with title bar. check here for my solution: Android:Layout move upwards & about 20dp area from the top hides behind the status bar

这篇关于Android的 - 状态栏有时隐藏的视图部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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