Browse Source

ui scaling fixes

mikhail 2 months ago
parent
commit
0ede2a4234

+ 0 - 12
.idea/deploymentTargetDropDown.xml

@@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="deploymentTargetDropDown">
-    <runningDeviceTargetSelectedWithDropDown>
-      <Target>
-        <type value="RUNNING_DEVICE_TARGET" />
-        <deviceKey>
-          <Key>
-            <type value="VIRTUAL_DEVICE_PATH" />
-            <value value="$USER_HOME$/.android/avd/4_WVGA_Nexus_S_API_30.avd" />
-          </Key>
-        </deviceKey>
-      </Target>
-    </runningDeviceTargetSelectedWithDropDown>
-    <timeTargetWasSelectedWithDropDown value="2021-11-15T17:59:37.719026Z" />
     <runningDeviceTargetsSelectedWithDialog>
       <Target>
         <type value="RUNNING_DEVICE_TARGET" />

+ 2 - 2
app/src/main/java/ru/mephi/voip/ui/profile/ProfileFragment.kt

@@ -35,6 +35,7 @@ import androidx.compose.ui.platform.ComposeView
 import androidx.compose.ui.platform.LocalContext
 import androidx.compose.ui.platform.LocalSoftwareKeyboardController
 import androidx.compose.ui.res.colorResource
+import androidx.compose.ui.res.dimensionResource
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.res.stringResource
 import androidx.compose.ui.text.SpanStyle
@@ -377,8 +378,7 @@ class ProfileFragment : Fragment() {
                 Text(
                     modifier = Modifier.align(alignment = Alignment.TopCenter),
                     text = stringResource(R.string.sip_account_header),
-                    fontSize = 30.sp,
-                    fontWeight = FontWeight.Bold
+                    fontSize = dimensionResource(id = R.dimen.toolbar_headers).value.sp,
                 )
                 IconButton(
                     modifier = Modifier.align(alignment = Alignment.TopEnd),

+ 9 - 2
app/src/main/res/layout/fragment_calls.xml

@@ -23,6 +23,14 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content">
 
+                <ImageView
+                    android:id="@+id/logo_left_image"
+                    android:layout_width="?attr/actionBarSize"
+                    android:layout_height="?attr/actionBarSize"
+                    android:layout_gravity="start|center_vertical"
+                    android:layout_marginStart="10dp"
+                    android:src="@drawable/logo_mephi" />
+
                 <TextView
                     android:id="@+id/textView"
                     android:layout_width="wrap_content"
@@ -30,8 +38,7 @@
                     android:layout_gravity="center"
                     android:text="Телефон"
                     android:textColor="@android:color/black"
-                    android:textFontWeight="700"
-                    android:textSize="25sp" />
+                    android:textSize="@dimen/toolbar_headers" />
 
                 <androidx.appcompat.widget.AppCompatImageButton
                     android:id="@+id/delete_records"

+ 5 - 14
app/src/main/res/layout/toolbar_catalog.xml

@@ -37,10 +37,7 @@
                     android:layout_height="?attr/actionBarSize"
                     android:layout_gravity="start|center_vertical"
                     android:layout_marginStart="10dp"
-                    android:src="@drawable/logo_mephi"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintStart_toStartOf="parent"
-                    app:layout_constraintTop_toTopOf="parent" />
+                    android:src="@drawable/logo_mephi" />
 
                 <TextView
                     android:id="@+id/toolbar_title"
@@ -49,13 +46,7 @@
                     android:layout_gravity="center"
                     android:text="@string/title_contacts"
                     android:textColor="#000"
-                    android:textSize="20sp"
-                    android:textStyle="bold"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintEnd_toEndOf="parent"
-                    app:layout_constraintStart_toStartOf="parent"
-                    app:layout_constraintTop_toTopOf="parent" />
-
+                    android:textSize="@dimen/toolbar_headers" />
 
                 <LinearLayout
                     android:layout_width="wrap_content"
@@ -65,11 +56,11 @@
 
                     <androidx.appcompat.widget.SearchView
                         android:id="@+id/search_view"
-                        android:iconifiedByDefault="true"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        app:queryBackground="@android:color/transparent"
-                        android:showAsAction="always|collapseActionView" />
+                        android:iconifiedByDefault="true"
+                        android:showAsAction="always|collapseActionView"
+                        app:queryBackground="@android:color/transparent" />
 
                     <com.polyak.iconswitch.IconSwitch
                         android:id="@+id/switch_search_type"

+ 1 - 0
app/src/main/res/values/dimens.xml

@@ -6,4 +6,5 @@
     <dimen name="fragment_horizontal_margin">16dp</dimen>
     <dimen name="fragment_vertical_margin">16dp</dimen>
     <dimen name="numpad_btn_fontsize">20sp</dimen>
+    <dimen name="toolbar_headers">25sp</dimen>
 </resources>