WIP color fixes

pull/282/head
Kevin Hester 2021-05-09 09:02:53 +08:00
rodzic 18d526166f
commit 59e430d30d
15 zmienionych plików z 45 dodań i 64 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8">
<bytecodeTargetLevel target="11">
<module name="app" target="1.8" />
<module name="geeksville-androidlib" target="1.7" />
<module name="Mesh Util-geeksville-androidlib" target="1.7" />

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

Wyświetl plik

@ -3,6 +3,7 @@
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />

13
TODO.md
Wyświetl plik

@ -1,15 +1,6 @@
# Remaining tasks before declaring 1.0
# Misc todo
- add new languages from eric: https://meshtastic.discourse.group/t/call-for-help-please-localize-the-app-for-your-language/107/61?u=geeksville
- add faq entry about range and antennas and rain
- first message sent is still doubled for some people
- let users set arbitrary params in android
- add a low level settings screen (let user change any of the RadioConfig parameters)
Things for the betaish period.
* let user change more channel parameters
* really great notes about importance of clean BLE disconnects: https://blog.classycode.com/a-short-story-about-android-ble-connection-timeouts-and-gatt-internal-errors-fa89e3f6a456
* move analytics out with https://blog.gradle.org/optional-dependencies
# Documentation tasks

Wyświetl plik

@ -113,7 +113,7 @@ protobuf {
dependencies {
def room_version = '2.2.6'
def room_version = '2.3.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

Wyświetl plik

@ -122,7 +122,7 @@
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Wyświetl plik

@ -279,7 +279,9 @@ class MeshService : Service(), Logging {
@param requireConnected set to false if you are okay with using a partially connected device (i.e. during startup)
*/
private fun sendToRadio(p: ToRadio.Builder, requireConnected: Boolean = true) {
val b = p.build().toByteArray()
val built = p.build()
debug("Sending to radio $built")
val b = built.toByteArray()
if (SoftwareUpdateService.isUpdating)
throw IsUpdatingException()
@ -1793,8 +1795,9 @@ class MeshService : Service(), Logging {
toRemoteExceptions {
// Init from and id
myNodeID?.let { myId ->
if (p.from == DataPacket.ID_LOCAL)
p.from = myId
// we no longer set from, we let the device do it
//if (p.from == DataPacket.ID_LOCAL)
// p.from = myId
if (p.id == 0)
p.id = generatePacketId()

Wyświetl plik

@ -685,10 +685,10 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
gatt?.writeCharacteristic(c) ?: false
}
/* fun asyncWriteReliable(
fun asyncWriteReliable(
c: BluetoothGattCharacteristic,
cb: (Result<Unit>) -> Unit
) = queueWriteCharacteristic(c, CallbackContinuation(cb)) */
) = queueWriteReliable(c, CallbackContinuation(cb))
fun writeReliable(c: BluetoothGattCharacteristic): Unit =
makeSync { queueWriteReliable(c, it) }

Wyświetl plik

@ -14,20 +14,17 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:theme="@style/MyToolbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
style="@style/MyToolbar"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -35,7 +32,7 @@
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView5"
android:id="@+id/appIconImageVIew"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/application_icon"
@ -57,7 +54,7 @@
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.MaterialToolbar>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.tabs.TabLayout
@ -65,25 +62,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- Screen.messages -> MessagesContent()
Screen.settings -> SettingsContent()
Screen.users -> UsersContent()
Screen.channel -> ChannelContent(UIState.getChannel())
Screen.map -> MapContent()
<com.google.android.material.tabs.TabItem
android:icon="@drawable/ic_twotone_message_24"
android:text="Messages"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
<com.google.android.material.tabs.TabItem
android:icon="@drawable/ic_twotone_settings_applications_24"
android:text="Settings"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
-->
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>

Wyświetl plik

@ -4,7 +4,7 @@
android:id="@+id/connectStatusImage"
android:contentDescription="@string/connection_status"
android:icon="@drawable/cloud_off"
android:tint="#FFFFFF"
android:tint="@color/colorOnPrimary"
android:title="@string/disconnected"
app:showAsAction="ifRoom" />
<item

Wyświetl plik

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3700B3</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorOnPrimary">#67EA94</color>
<color name="colorPrimary">#141414</color>
<color name="colorMsg">#212121</color>
<color name="colorMyMsg">#212121</color>
<color name="colorDebugBackground">#141414</color>
<color name="colorAdvancedBackground">#141414</color>
<color name="colorIconTint">#FFFFFF</color>
<color name="colorMenuItem">#FFFFFF</color>
<color name="colorToolbar">#000000</color>
</resources>

Wyświetl plik

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3700B3</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorOnPrimary">#FFFFFF</color>
<color name="colorPrimary">#67EA94</color>
<color name="colorPrimaryDark">#67EA94</color>
<color name="colorMsg">#F2F2F2</color>
<color name="colorMyMsg">#EDEAF4</color>
<color name="colorDebugBackground">#FFFFFF</color>
<color name="colorAdvancedBackground">#FFFFFF</color>
<color name="colorIconTint">#000000</color>
<color name="colorMenuItem">#000000</color>
<color name="colorToolbar">#FFFFFF</color>
</resources>

Wyświetl plik

@ -3,14 +3,14 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. -->
<item name="actionBarTheme">@style/MyActionBar</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">#FFFFFF</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="android:itemTextAppearance">@style/menu_item_color</item>
</style>
<style name="AppTheme.Spinner">
@ -53,10 +53,19 @@
<item name="cornerSize">50%</item>
</style>
// Toolbar style
<style name="MyToolbar" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
<item name="tint">@color/colorToolbar</item>
<item name="colorOnPrimary">@color/colorToolbar</item>
<item name="android:textColor">@color/colorToolbar</item>
<style name="MyThemeOverlay_Toolbar" parent="">
<item name="background">@color/colorPrimary</item>
<item name="android:textColorPrimary">@color/colorOnPrimary</item>
<item name="tint">@color/colorOnPrimary</item>
</style>
<style name="MyActionBar" parent="@style/ThemeOverlay.MaterialComponents.ActionBar">
<item name="background">@color/colorPrimary</item>
<item name="android:textColorPrimary">@color/colorOnPrimary</item>
</style>
<style name="MyToolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="materialThemeOverlay">@style/MyThemeOverlay_Toolbar</item>
</style>
</resources>

Wyświetl plik

@ -10,7 +10,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"

Wyświetl plik

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip