Forced LTR across the app and widgets.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="false"
|
||||||
android:theme="@style/Theme.NGXHttpMonitoringClient"
|
android:theme="@style/Theme.NGXHttpMonitoringClient"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ import android.Manifest
|
|||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.runtime.DisposableEffect
|
import androidx.compose.runtime.DisposableEffect
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||||
|
import androidx.compose.ui.unit.LayoutDirection
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import net.rodakot.ngxhttpmonitoringclient.ui.MonitorApp
|
import net.rodakot.ngxhttpmonitoringclient.ui.MonitorApp
|
||||||
@@ -18,6 +22,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
setTheme(R.style.Theme_NGXHttpMonitoringClient)
|
setTheme(R.style.Theme_NGXHttpMonitoringClient)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
window.decorView.layoutDirection = View.LAYOUT_DIRECTION_LTR
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
requestNotificationPermission()
|
requestNotificationPermission()
|
||||||
setContent {
|
setContent {
|
||||||
@@ -26,7 +31,9 @@ class MainActivity : ComponentActivity() {
|
|||||||
onDispose { controller.close() }
|
onDispose { controller.close() }
|
||||||
}
|
}
|
||||||
NGXHttpMonitoringClientTheme {
|
NGXHttpMonitoringClientTheme {
|
||||||
MonitorApp(controller)
|
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Ltr) {
|
||||||
|
MonitorApp(controller)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ abstract class BaseWidgetConfigureActivity : Activity() {
|
|||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
window.decorView.layoutDirection = View.LAYOUT_DIRECTION_LTR
|
||||||
setResult(RESULT_CANCELED)
|
setResult(RESULT_CANCELED)
|
||||||
appWidgetId = intent?.extras?.getInt(
|
appWidgetId = intent?.extras?.getInt(
|
||||||
AppWidgetManager.EXTRA_APPWIDGET_ID,
|
AppWidgetManager.EXTRA_APPWIDGET_ID,
|
||||||
@@ -50,6 +51,8 @@ abstract class BaseWidgetConfigureActivity : Activity() {
|
|||||||
val servers = repository.servers()
|
val servers = repository.servers()
|
||||||
val root = LinearLayout(this).apply {
|
val root = LinearLayout(this).apply {
|
||||||
orientation = LinearLayout.VERTICAL
|
orientation = LinearLayout.VERTICAL
|
||||||
|
layoutDirection = View.LAYOUT_DIRECTION_LTR
|
||||||
|
textDirection = View.TEXT_DIRECTION_LTR
|
||||||
setPadding(32, 32, 32, 32)
|
setPadding(32, 32, 32, 32)
|
||||||
setBackgroundColor(Color.rgb(14, 17, 22))
|
setBackgroundColor(Color.rgb(14, 17, 22))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/widget_background"
|
android:background="@drawable/widget_background"
|
||||||
|
android:layoutDirection="ltr"
|
||||||
|
android:textDirection="ltr"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/widget_background"
|
android:background="@drawable/widget_background"
|
||||||
|
android:layoutDirection="ltr"
|
||||||
|
android:textDirection="ltr"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/widget_background"
|
android:background="@drawable/widget_background"
|
||||||
|
android:layoutDirection="ltr"
|
||||||
|
android:textDirection="ltr"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/widget_background"
|
android:background="@drawable/widget_background"
|
||||||
|
android:layoutDirection="ltr"
|
||||||
|
android:textDirection="ltr"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/widget_background"
|
android:background="@drawable/widget_background"
|
||||||
|
android:layoutDirection="ltr"
|
||||||
|
android:textDirection="ltr"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ Signed upload bundle, after signing values are configured:
|
|||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$env:GRADLE_USER_HOME='C:\Users\meghdad\AndroidStudioProjects\NGXhttpMonitoringClient\.gradle-user'
|
$env:GRADLE_USER_HOME='C:\Users\meghdad\AndroidStudioProjects\NGXhttpMonitoringClient\.gradle-user'
|
||||||
.\gradlew.bat :app:bundleRelease --console=plain
|
.\gradlew.bat :app:bundleRelease --console=plain # for bulding aab
|
||||||
|
.\gradlew.bat :app:assembleRelease --console=plain # for bulding apk
|
||||||
```
|
```
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
VERSION_CODE=1
|
VERSION_CODE=102000
|
||||||
VERSION_NAME=1.0.0
|
VERSION_NAME=1.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user