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:

enter image description here

the real image of this: (there's no background)

enter image description here

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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -