habitica-android
habitica-android copied to clipboard
Images not aligned properly
Describe the bug Images are not center with text on android.
To Reproduce Create a new task with any embedded image on android and it will not be aligned. On the web version it works fine for me.
Expected behavior Make them have the same center vertical alignment as text and emojis.
Screenshots
Smartphone (please complete the following information):
- Device: Huawei P40
- OS: Android 12.0
- App Version: 3.5.2.1
- Habitica Username: DorainK29
- Also tried on emulator - Same results
Additional context I tried changing the gravity of the text field in xml to center vertical, but I didn't change the way the image was displayed.
Can you also post a screenshot of the behaviour you are expecting? Going by the screenshot you posted, the image and the text are aligned, but are aligned at the bottom/baseline.
I believe it would look a lot better shown as it is in the title rather than the way its written in the description.
I just hardcoded the image in, to show how it would look like, this is the code snippet.
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/pic_buff1"/>
<com.habitrpg.android.habitica.ui.views.EllipsisTextView
android:id="@+id/checkedTextView"
style="@style/Subheader3"
android:textColor="?attr/textColorPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="2sp"
android:layout_gravity="center_vertical"
android:textSize="15sp"
android:letterSpacing="0.025"
tools:text="Habit Title" />
</LinearLayout>
alright so center align images with the line of text in title and notes