tinode / tindroid

Tinode chat client application for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avatar ignores with and height in contact_basic.xml

sanmiguel2019 opened this issue · comments

contact_basic.xml

Avatar always occupies all the height of action bar. From a design standpoint, it looks very ugly, and I don't think that's what it is meant to be because contact_basic.xml contains

android:layout_width
android:layout_height

but these values are being ignored in ImageView. I spent already 2 days trying to decrease avatar's size. Tried to add margins, paddings to ImageView, ImageSwitcher; tried to change layout_width, layout_height. I see changes in Android Studio:

carol1

but in the app avatar always occupies all the height. Posted a question on stackowerflow but given solution works either.

I don't know if this problem will be fixed. If not, could tell me someone how can I change avatar's size for my design? Thanks.

carol

commented

Here is what I see on my pixel phone:

Screenshot_20200918-082011

In general, this is not a place to get help with general programming questions. Please use Stackoverflow or pay someone to do it for you.

On my 2 Android phones avatar occupies all the height of the action bar.

commented

Then please debug it and post your solution here. Thanks.

I give up. I have spent a lot of time trying to decrease dimensions of the avatar in the topic. No success. I can do anything but it always occupies all the height of the action bar. Tried to add margins, paddings, tried to change layout_width/height. Tried to combine RelativeLayout with LinearLayout. Tried to add android:scaleType="fitXY", android:scaleType="centerInside", android:adjustViewBounds="true" Any changes have absolutely no effect - avatar always stays in the same place of the same size.

I also downloaded Tindroid from Play Store but I see the same problem on both - Android 8.1.0 and Android 5.1.1. phones.

I hope that I am trying to make changes to the correct file - its contact_basic.xml? I can not find any other corresponding files.
I also tried co change avatar dimensions in contact.xml file and it works without any problems, but in contact_basic.xml not.

I guess something is overwriting values of contact_basic.xml file.

commented

I don't have a phone with API below 28. Here is a screenshot from emulator at API 23:

Screenshot_1600969876

commented

I cannot debug what I cannot see.