skip to Main Content

Android Studio – image is cropped inside the image view

I'm trying to load an image into an image view: but the image is cropped inside the image view: <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="30dp" android:layout_marginBottom="10dp" android:gravity="center" android:scaleType="centerCrop" android:src="@mipmap/icona_animal_app" /> why does this thing happen? how can i solve?

VIEW QUESTION

Android Studio – problem with setVisibility when swithching between two ImageView elements in Java

imageView1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(imageViewGet1.getDrawable() != null){ imageView1.setVisibility(View.INVISIBLE); imageViewGet1.setVisibility(View.VISIBLE); } OpenGallery1(); } }); imageView2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(imageViewGet2.getDrawable() != null){ imageView2.setVisibility(View.INVISIBLE); imageViewGet2.setVisibility(View.VISIBLE); } OpenGallery2(); } }); when I run the…

VIEW QUESTION
Back To Top
Search