【问题标题】:Make the image background in whole background [duplicate]在整个背景中制作图像背景[重复]
【发布时间】:2019-08-04 18:04:37
【问题描述】:

我想让我的登录活动在后台关闭整个活动,包括手机本身的时钟像这样

这是我的代码

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@drawable/bgd2"
    tools:context=".Signin">

但我的输出是这样的

我需要删除橙色条并使其与第一张图片相同。

如何按照这种风格做出来:

  <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="colorControlNormal">#FFF</item>
        <item name="colorControlActivated">#FFF</item>
    </style>

【问题讨论】:

    标签: java android


    【解决方案1】:

    您需要使用 NoActionBar 样式移除 ActionBar 颜色。

    有两种选择。

    1. 将windowNoTitle样式放在style.xml中 示例:

      <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="windowNoTitle">true</item> </style>

    2. 把这段代码放在Activity上。

      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getSupportActionBar().hide();

    加法: 如果您还隐藏导航按钮,则使用 XML 样式中的 FullScreen 选项。

    <item name="android:windowFullscreen">true</item>
    

    【讨论】:

      猜你喜欢
      • 2011-12-24
      • 1970-01-01
      • 2018-04-19
      • 2016-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-12
      相关资源
      最近更新 更多