android - Why background color are included in png image of ImageView? -
i absolute beginner android. learning how design layout. having problem imageview:
when set src of imageview png file, dark color background automatically added images in screenshot:
the real image of this: (there's no background)
this xml layout toolbar , did not set background imageview:
<?xml version="1.0" encoding="utf-8"?> <relativelayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/toolbar"     android:fitssystemwindows="true"     android:minheight="?attr/actionbarsize"     app:theme="@style/themeoverlay.appcompat.dark.actionbar"     android:background="?attr/colorprimarydark">         <imagebutton             android:id="@+id/btn_open_sidebar"             android:src="@drawable/open_icon"             android:layout_width="wrap_content"             android:layout_height="wrap_content" />          <imagebutton             android:layout_alignparentright="true"             android:id="@+id/btn_calendar"             android:src="@drawable/calendar"             android:layout_width="wrap_content"             android:layout_height="wrap_content" /> </relativelayout>   so how can make png image transparent or same background toolbar? mean, how remove default dark background color?
i think because using imagebutton android adds default background it. can add android:backgroud="@android:color/transparent" imagebuttons , force android use transparent background. 


Comments
Post a Comment