相关疑难解决方法(0)

如何在Android中隐藏状态栏

我提到了这个链接.在如果上的EditText用户点击(为前要:)在那个时候键盘会被弹出,并在同一时间,用户可以可以滚动查看所有剩余的视图(例如:撰写,主题,发送按钮),那个屏幕.同样在我的应用程序中,我有一个活动,我有一些小部件或视图.假设用户点击我的Activity中的Edittext然后键盘弹出,我可以滚动查看剩余的视图.但是如果我android:theme="@android:style/Theme.NoTitleBar.Fullscreen"在清单中给出这个属性我无法滚动查看剩余的视图但是如果android:theme="@android:style/Theme.NoTitleBar"在清单中给出这样的属性我可以滚动查看剩余视图但是在该屏幕中有状态栏,这里我想要全屏和即使弹出键盘,我也可以滚动查看剩余的视图..?我必须为此做些什么改变..?

android android-theme android-statusbar

95
推荐指数
16
解决办法
16万
查看次数

视频暂停,错误为"未经授权的覆盖"

我在全屏模式下播放视频时出现以下错误(仅限全屏).当它全屏显示时,我隐藏了布局中的所有其他组件,但它说android:id/statusBarBackground这是导致问题的视图.我该如何控制?

YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is obscured by android.view.View{16771a9d V.ED.... ........ 0,0-1920,75 #102002f android:id/statusBarBackground}. The view is inside the YouTubePlayerView, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 0, top: 0, right: 0, bottom: 1005.. 
Run Code Online (Sandbox Code Playgroud)

我的布局看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:id="@+id/videoListLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="top"
        android:orientation="vertical">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:background="@drawable/heading" >

            <TextView
                android:id="@+id/topDisplayArea"
                android:layout_width="match_parent"
                android:layout_height="match_parent" …
Run Code Online (Sandbox Code Playgroud)

android youtube-api android-youtube-api

4
推荐指数
1
解决办法
5749
查看次数

Android删除动作栏标题保持工具栏菜单

我需要在我的应用程序中保留选项卡式工具栏,删除操作栏.这就是现在的样子: 在此输入图像描述

但我希望它看起来像这样:

在此输入图像描述

我的代码xml是:

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

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"/>

    <android.support.design.widget.TabLayout
        android:id="@+id/tab_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

这是我的.java:

public class MyActivity extends AppCompatActivity {
    @Override
       protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_layout);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
        ViewPager viewPager = (ViewPager) findViewById(R.id.pager);

        if (toolbar != null) {
            setSupportActionBar(toolbar);
        }

        viewPager.setAdapter(new SectionPagerAdapter(getSupportFragmentManager()));
        tabLayout.setupWithViewPager(viewPager);
    }

    public class SectionPagerAdapter extends FragmentPagerAdapter {

        public SectionPagerAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override
        public Fragment getItem(int position) …
Run Code Online (Sandbox Code Playgroud)

java tabs android toolbar android-actionbar

0
推荐指数
1
解决办法
2065
查看次数