I have been developing a conversation app. I built an APK(Nougat) and sent to my friends to test. One of my friend didn't get the send icon correctly(marshmallow). I have given rocket icon to send the message. but in his mobile he can able to see only message icon. Also another friend didn't get background image but rocket icon is visible for him(Lollipop). snapshots attached below.
please help me to rectify this error.
<ImageButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="7"
android:padding="4dp"
android:id="@+id/send_button"
app:srcCompat="@android:drawable/ic_menu_send"
android:background="@android:color/transparent"
android:tint="@color/colorAccent"
android:contentDescription="@string/send_to_watson_button" />
and for background i used like this..
<android.support.design.widget.CoordinatorLayout
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"
android:fitsSystemWindows="true"
tools:context="com.ibm.watson_conversation.MainActivity"
android:background="@drawable/tilerepeat">
Wrong Image
Expected Image
答案 0 :(得分:0)
@EugenPechanec是对的。每个Android ROM都有其独特的资源/图标集。 @android:drawable
根据安装apk的ROM访问图标。它与您设计应用程序的方式无关。
你应该做的是从互联网上获取一个图标[仅供测试。对于商业用途,您需要设计自己的图标,以便在所有手机上使用,将其复制到您的手机中。可绘制文件夹,然后使用@drawable/iconnamehere
。这样,所有设备上的图标都是统一的。