Image height not displaying properly
- Dominant language
- Java
- Stars
- 18.8k
- Forks
- 3.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
My images are not displaying properly. It fits fine with width, but the height just doesn't change at all.
This is my code and this is how it shows the image for me.
This is the custom xml to display the image
`
`
This is it being implemented
` TextView textviewUsername, textviewUserEmail;
CircleImageView profilePic;
byte[] decodedString = Base64.decode(SharedPrefManager.getInstance(this).getUser().getPhoto(),
Base64.DEFAULT);
Bitmap bmpProfilePic = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_profile);
profilePic = findViewById(R.id.imgProfilePic);
profilePic.setImageBitmap(bmpProfilePic);
profilePic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AlertDialog.Builder mBuilder = new AlertDialog.Builder(UserProfile.this);
View mView = getLayoutInflater().inflate(R.layout.photo_view, null);
PhotoView photoView = mView.findViewById(R.id.imageZoom);
photoView.setImageBitmap(bmpProfilePic);
mBuilder.setView(mView);
AlertDialog mDialog = mBuilder.create();
mDialog.show();
}
});`
And this is the result of the image


Could you help me, please?
Contributor guide
Assessment
This issue has not been assessed yet.