微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android 应用程序图标未显示在三星 Galaxy Gear s3 前沿通知中

如何解决Android 应用程序图标未显示在三星 Galaxy Gear s3 前沿通知中

我为我的 android 手机创建了一个应用程序,它也发送通知,这对我的手机很有用,但是当我在我的 gear s3 边界上看到通知时,它只显示标准的 android 图标。 我尝试从我的项目和每个包含图标的 DOTxml 文件删除每个标准的 android 图标。 我确保项目和清单中只有我的图标,我尝试将 android:logo 与 android:icon 一起添加,但这也不起作用。我的 mipmap 文件夹和 drawable 文件夹中已经有各种尺寸的图标,我已经重新启动了手机和手表,但没有任何帮助。 这是我的清单:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/colorBlack"
    android:id="@+id/favoriteFragment_RL"
    tools:context="Fragments.Favorite">

   <com.google.android.material.tabs.TabLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:id="@+id/favoriteFragment_TabLayout"
       android:minHeight="?actionBarSize"
       app:tabGravity="fill"
       app:tabIndicatorColor="@color/colorWhite"
       app:tabIndicatorHeight="4dp"
       app:tabBackground="@color/colorPrimary"
       app:tabMode="fixed"
       app:tabTextColor="@color/colorWhite"/>
    
    <androidx.viewpager.widget.ViewPager
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/favoriteFragment_viewPager"
        android:layout_below="@id/favoriteFragment_TabLayout"/>


</RelativeLayout>

my java code

     package Fragments;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TableLayout;
import android.widget.Toast;

import com.example.connectsocialmediaapp.R;

import AdapterClasses.FavoriteStatusTabAdapter;


public class Favorite extends Fragment {


    //XML Variables
    private View parent;
    private TableLayout objectTablayout;
    private ViewPager objectViewPager;

    //Class Variables
    favoriteImageStatusFragment objectFavoriteImageStatusFragment;
    FavoriteStatusTabAdapter objectFavoriteStatusTabAdapter;
    favoriteTextStatusFragment objectFavoriteTextStatusFragment;

    private int[] tabIcons= {
            R.drawable.ic_text,R.drawable.ic_image
    };
    public Favorite() {
        // required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        parent= inflater.inflate(R.layout.fragment_favorite,container,false);
        initializeVariables();
        return parent;
    }

    private void addFragmentToTablayout()
    {
    try
    {
        objectFavoriteStatusTabAdapter=new FavoriteStatusTabAdapter(getChildFragmentManager());
        objectFavoriteStatusTabAdapter.addFragments(objectFavoriteTextStatusFragment);

        objectFavoriteStatusTabAdapter.addFragments(objectFavoriteImageStatusFragment);
        objectViewPager.setAdapter(objectFavoriteStatusTabAdapter);


        objectTablayout.(objectViewPager);
        objectViewPager.setSaveFromParentEnabled(false);

    }
    catch (Exception e)
    {
        Toast.makeText(getContext(),e.getMessage(),Toast.LENGTH_SHORT).show();
    }
    }


    private void initializeVariables()
    {
        try
        {
            objectFavoriteTextStatusFragment=new favoriteTextStatusFragment();
            objectFavoriteImageStatusFragment=new favoriteImageStatusFragment();

            objectTablayout=parent.findViewById(R.id.favoriteFragment_TabLayout);

            objectViewPager=parent.findViewById(R.id.favoriteFragment_viewPager);
        }
        catch (Exception e)
        {
            Toast.makeText(getContext(),Toast.LENGTH_SHORT).show();
            
        }
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?