mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Fix album sizing issues on skinnier devices.
This commit is contained in:
parent
2be382afab
commit
fc989f3820
@ -4,19 +4,19 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/album_thumbnail_root"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="150dp">
|
||||
android:layout_width="@dimen/album_total_width"
|
||||
android:layout_height="@dimen/album_2_total_height">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_1"
|
||||
android:layout_height="150dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_2_cell_width"
|
||||
android:layout_height="@dimen/album_2_total_height"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_2"
|
||||
android:layout_height="150dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_2_cell_width"
|
||||
android:layout_height="@dimen/album_2_total_height"
|
||||
android:layout_gravity="right|end"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
|
@ -3,26 +3,26 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/album_thumbnail_root"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="200dp">
|
||||
android:layout_width="@dimen/album_total_width"
|
||||
android:layout_height="@dimen/album_3_total_height">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_1"
|
||||
android:layout_height="200dp"
|
||||
android:layout_width="199dp"
|
||||
android:layout_width="@dimen/album_3_cell_width_big"
|
||||
android:layout_height="@dimen/album_3_total_height"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_2"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_3_cell_size_small"
|
||||
android:layout_height="@dimen/album_3_cell_size_small"
|
||||
android:layout_gravity="right|end|top"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_3"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_3_cell_size_small"
|
||||
android:layout_height="@dimen/album_3_cell_size_small"
|
||||
android:layout_gravity="right|end|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
|
@ -3,33 +3,33 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/album_thumbnail_root"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp">
|
||||
android:layout_width="@dimen/album_total_width"
|
||||
android:layout_height="@dimen/album_4_total_height">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_1"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_4_cell_size"
|
||||
android:layout_height="@dimen/album_4_cell_size"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_2"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_4_cell_size"
|
||||
android:layout_height="@dimen/album_4_cell_size"
|
||||
android:layout_gravity="right|end|top"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_3"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_4_cell_size"
|
||||
android:layout_height="@dimen/album_4_cell_size"
|
||||
android:layout_gravity="left|start|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_4"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_4_cell_size"
|
||||
android:layout_height="@dimen/album_4_cell_size"
|
||||
android:layout_gravity="right|end|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
|
@ -3,40 +3,40 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/album_thumbnail_root"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="250dp">
|
||||
android:layout_width="@dimen/album_total_width"
|
||||
android:layout_height="@dimen/album_5_total_height">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_1"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_big"
|
||||
android:layout_height="@dimen/album_5_cell_size_big"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_2"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_big"
|
||||
android:layout_height="@dimen/album_5_cell_size_big"
|
||||
android:layout_gravity="right|end|top"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_3"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="left|start|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_4"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_5"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="right|end|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
|
@ -4,39 +4,39 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/album_thumbnail_root"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="250dp">
|
||||
android:layout_width="@dimen/album_total_width"
|
||||
android:layout_height="@dimen/album_5_total_height">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_1"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_big"
|
||||
android:layout_height="@dimen/album_5_cell_size_big"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_2"
|
||||
android:layout_height="149dp"
|
||||
android:layout_width="149dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_big"
|
||||
android:layout_height="@dimen/album_5_cell_size_big"
|
||||
android:layout_gravity="right|end|top"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_3"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="left|start|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/album_cell_4"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
app:thumbnail_radius="0dp"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="99dp"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="@dimen/album_5_cell_size_small"
|
||||
android:layout_height="@dimen/album_5_cell_size_small"
|
||||
android:layout_gravity="right|end|bottom">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="media_bubble_max_width">240dp</dimen>
|
||||
<dimen name="media_bubble_max_height">300dp</dimen>
|
||||
</resources>
|
14
res/values-sw360dp/dimens.xml
Normal file
14
res/values-sw360dp/dimens.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="album_total_width">252dp</dimen>
|
||||
<dimen name="album_2_total_height">126dp</dimen>
|
||||
<dimen name="album_2_cell_width">125dp</dimen>
|
||||
<dimen name="album_3_total_height">168dp</dimen>
|
||||
<dimen name="album_3_cell_width_big">167dp</dimen>
|
||||
<dimen name="album_3_cell_size_small">83dp</dimen>
|
||||
<dimen name="album_4_total_height">252dp</dimen>
|
||||
<dimen name="album_4_cell_size">125dp</dimen>
|
||||
<dimen name="album_5_total_height">210dp</dimen>
|
||||
<dimen name="album_5_cell_size_big">125dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">83dp</dimen>
|
||||
</resources>
|
14
res/values-sw400dp/dimens.xml
Normal file
14
res/values-sw400dp/dimens.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="album_total_width">300dp</dimen>
|
||||
<dimen name="album_2_total_height">150dp</dimen>
|
||||
<dimen name="album_2_cell_width">149dp</dimen>
|
||||
<dimen name="album_3_total_height">200dp</dimen>
|
||||
<dimen name="album_3_cell_width_big">199dp</dimen>
|
||||
<dimen name="album_3_cell_size_small">99dp</dimen>
|
||||
<dimen name="album_4_total_height">300dp</dimen>
|
||||
<dimen name="album_4_cell_size">149dp</dimen>
|
||||
<dimen name="album_5_total_height">250dp</dimen>
|
||||
<dimen name="album_5_cell_size_big">149dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">99dp</dimen>
|
||||
</resources>
|
@ -17,7 +17,18 @@
|
||||
<dimen name="contact_photo_target_size">64dp</dimen>
|
||||
<dimen name="contact_selection_photo_size">50dp</dimen>
|
||||
|
||||
<!-- TODO: Consolidate these two message corner things -->
|
||||
<dimen name="album_total_width">210dp</dimen>
|
||||
<dimen name="album_2_total_height">105dp</dimen>
|
||||
<dimen name="album_2_cell_width">104dp</dimen>
|
||||
<dimen name="album_3_total_height">140dp</dimen>
|
||||
<dimen name="album_3_cell_width_big">139dp</dimen>
|
||||
<dimen name="album_3_cell_size_small">69dp</dimen>
|
||||
<dimen name="album_4_total_height">210dp</dimen>
|
||||
<dimen name="album_4_cell_size">104dp</dimen>
|
||||
<dimen name="album_5_total_height">175dp</dimen>
|
||||
<dimen name="album_5_cell_size_big">104dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">69dp</dimen>
|
||||
|
||||
<dimen name="message_corner_radius">16dp</dimen>
|
||||
<dimen name="message_corner_collapse_radius">4dp</dimen>
|
||||
<dimen name="message_bubble_corner_radius">2dp</dimen>
|
||||
|
Loading…
Reference in New Issue
Block a user