2 Commits b8289bc261 ... c0cdb1186a

Author SHA1 Message Date
  Adam Pioterek c0cdb1186a fix banner text boundaries 5 years ago
  Adam Pioterek 417ac23db4 fix sorting in stop specify — line ‘T1’ is not int 5 years ago

+ 1 - 1
app/build.gradle

@@ -32,7 +32,7 @@ dependencies {
     implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
 
-    implementation 'com.google.android.material:material:1.1.0-alpha02'
+    implementation 'com.google.android.material:material:1.1.0-alpha03'
 
     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0-eap13'

+ 1 - 1
app/src/main/java/ml/adamsprogs/bimba/activities/StopSpecifyActivity.kt

@@ -63,7 +63,7 @@ class StopSpecifyActivity : AppCompatActivity() {
             }
             holder.stopCode.text = values.keys.sorted()[position]
             holder.stopHeadlines.text = values.entries.sortedBy { it.key }[position].value
-                    .sortedBy { it.split(" → ")[0].toInt() }
+                    .sortedBy { it.split(" → ")[0].padStart(4, '0') }
                     .joinToString()
         }
 

+ 10 - 8
app/src/main/res/layout/banner.xml

@@ -20,7 +20,7 @@
         android:id="@+id/banner_more"
         style="@style/Widget.AppCompat.Button.Borderless.Colored"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="36dp"
         android:layout_marginEnd="8dp"
         android:layout_marginBottom="8dp"
         android:text="@string/more"
@@ -30,15 +30,20 @@
 
     <TextView
         android:id="@+id/banner_text"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
         android:layout_marginTop="24dp"
+        android:layout_marginEnd="16dp"
         android:layout_marginBottom="20dp"
         android:ellipsize="end"
+        android:maxLines="2"
+        android:minLines="1"
+        android:singleLine="false"
         android:text=""
         android:textAppearance="@style/TextAppearance.AppCompat.Body2"
         app:layout_constraintBottom_toTopOf="@+id/banner_more"
+        app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@+id/banner_icon"
         app:layout_constraintTop_toTopOf="parent" />
 
@@ -47,11 +52,8 @@
         android:layout_width="40dp"
         android:layout_height="40dp"
         android:layout_marginStart="16dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginBottom="8dp"
-        app:layout_constraintBottom_toBottomOf="parent"
+        android:contentDescription="@string/vm_message_icon"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:srcCompat="@drawable/ic_message"
-        android:contentDescription="@string/vm_message_icon" />
+        app:layout_constraintTop_toTopOf="@+id/banner_text"
+        app:srcCompat="@drawable/ic_message" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 2
build.gradle

@@ -1,7 +1,7 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 
 buildscript {
-    ext.kotlin_version = '1.3.11'
+    ext.kotlin_version = '1.3.20'
     repositories {
         jcenter()
         maven { url 'https://maven.google.com' }
@@ -9,7 +9,7 @@ buildscript {
         google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.2.1'
+        classpath 'com.android.tools.build:gradle:3.3.0'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
 
         // NOTE: Do not place your application dependencies here; they belong

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -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-4.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

+ 2 - 0
todo

@@ -15,3 +15,5 @@ v departures sort (timeTill, onStop) : StopActivity
 v sort and limit search results
 T PEKA info
 - check update (only in APK builds)
+- settings day/night
+- ‘no conn…’ only w/o timetable