android - TaskDescription 的主要颜色应该是不透明的

标签 android

错误

java.lang.RuntimeException: 无法启动 Activity ComponentInfo{com.example.vigneshbaskar.concavechat/com.example.vigneshbaskar.concavechat.MainActivity}: java.lang.RuntimeException: TaskDescription 的原色应该是不透明的

Java

package com.example.vigneshbaskar.concavechat;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.vigneshbaskar.concavechat.MainActivity">

</RelativeLayout>

list

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.vigneshbaskar.concavechat">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name="com.example.vigneshbaskar.concavechat.MainActivity"
            android:theme="@style/FullTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

最佳答案

你不能在原色中使用 Alpha 只是让你的原色不透明。转到 res>values>colors 并用此 #3F51B5(蓝色)替换您的主要颜色代码;

关于android - TaskDescription 的主要颜色应该是不透明的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43438588/

相关文章:

android - AppCompatActivity 不可分配给 Activity

android - Facebook Unity SDK,如何使用 webview 而不是 FB App 强制登录

Android: ListAdapter 填充图像(图标)源

java - Android Studio 更新了,现在代码太大了

android - 如何从 Rotten Tomatoes 的 API 访问特定的 JSON 数据

java.lang.StringIndexOutOfBoundsException : when using PolyUtil. 解码

java - 空对象引用上的“android.text.Editable android.widget.EditText.getText()”,代码顶部带有警报对话框

android - onPostExecute() 不能使用 MainActivity 元素

android - 使用 (".info/connected") 引用的 Firebase 互联网连接检查是否会增加成本?

android - 滑动抽屉出现在所有 Activity 中