Skip to content

Commit 6bfb206

Browse files
committed
fix #864, fixing a glitch at 1 tab visible only
1 parent ee3edc3 commit 6bfb206

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

app/src/main/res/layout/activity_main.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
</com.google.android.material.appbar.AppBarLayout>
2323

24-
<RelativeLayout
24+
<androidx.constraintlayout.widget.ConstraintLayout
2525
android:id="@+id/main_holder"
2626
android:layout_width="match_parent"
2727
android:layout_height="match_parent"
@@ -30,30 +30,32 @@
3030
<com.simplemobiletools.commons.views.MyViewPager
3131
android:id="@+id/view_pager"
3232
android:layout_width="match_parent"
33-
android:layout_height="match_parent"
34-
android:layout_above="@+id/main_tabs_holder" />
33+
android:layout_height="0dp"
34+
app:layout_constraintBottom_toTopOf="@+id/main_tabs_holder"
35+
app:layout_constraintTop_toTopOf="parent" />
3536

3637
<ImageView
3738
android:id="@+id/main_dialpad_button"
3839
android:layout_width="@dimen/dialpad_button_size"
3940
android:layout_height="@dimen/dialpad_button_size"
40-
android:layout_above="@+id/main_tabs_holder"
41-
android:layout_centerHorizontal="true"
4241
android:layout_marginBottom="@dimen/activity_margin"
4342
android:background="@drawable/circle_background"
4443
android:contentDescription="@string/dialpad"
4544
android:elevation="@dimen/medium_margin"
4645
android:padding="@dimen/activity_margin"
47-
android:src="@drawable/ic_dialpad_vector" />
46+
android:src="@drawable/ic_dialpad_vector"
47+
app:layout_constraintBottom_toTopOf="@+id/main_tabs_holder"
48+
app:layout_constraintEnd_toEndOf="parent"
49+
app:layout_constraintStart_toStartOf="parent" />
4850

4951
<com.google.android.material.tabs.TabLayout
5052
android:id="@+id/main_tabs_holder"
5153
android:layout_width="match_parent"
5254
android:layout_height="wrap_content"
53-
android:layout_alignParentBottom="true"
55+
app:layout_constraintBottom_toBottomOf="parent"
5456
app:tabIndicator="@null"
5557
app:tabMinWidth="150dp"
5658
app:tabRippleColor="@null" />
5759

58-
</RelativeLayout>
60+
</androidx.constraintlayout.widget.ConstraintLayout>
5961
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.simplemobiletools.contacts.pro.fragments.ContactsFragment
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<com.simplemobiletools.contacts.pro.fragments.ContactsFragment xmlns:android="http://schemas.android.com/apk/res/android"
43
android:id="@+id/contacts_fragment"
54
android:layout_width="match_parent"
65
android:layout_height="match_parent">
76

8-
<include layout="@layout/fragment_letters_layout"/>
7+
<include layout="@layout/fragment_letters_layout" />
98

109
</com.simplemobiletools.contacts.pro.fragments.ContactsFragment>

0 commit comments

Comments
 (0)