forked from upstream-mirrors/quik
Merge pull request #362 from wiggleforlife/feat/dpad
Improve d-pad support
This commit is contained in:
@@ -852,4 +852,11 @@ class ComposeActivity : QkThemedActivity(), ComposeView {
|
||||
|
||||
override fun onBackPressed() = backPressedIntent.onNext(Unit)
|
||||
|
||||
override fun focusMessage() {
|
||||
runOnUiThread {
|
||||
val message = findViewById<QkEditText>(R.id.message)
|
||||
if (message !== null) message.requestFocus()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,5 +112,6 @@ interface ComposeView : QkView<ComposeState> {
|
||||
fun showDeleteDialog( messages: List<Long>)
|
||||
fun showClearCurrentMessageDialog()
|
||||
fun startSpeechRecognition()
|
||||
fun focusMessage()
|
||||
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ class ComposeViewModel @Inject constructor(
|
||||
)
|
||||
}
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
.subscribe{view.focusMessage()}
|
||||
|
||||
// View QKSMS+
|
||||
view.viewQksmsPlusIntent
|
||||
|
||||
@@ -30,6 +30,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewStub
|
||||
import android.widget.LinearLayout
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.view.GravityCompat
|
||||
@@ -89,8 +90,11 @@ class MainActivity : QkThemedActivity(), MainView {
|
||||
override val composeIntent by lazy { compose.clicks() }
|
||||
override val drawerOpenIntent: Observable<Boolean> by lazy {
|
||||
drawerLayout
|
||||
.drawerOpen(Gravity.START)
|
||||
.doOnNext { dismissKeyboard() }
|
||||
.drawerOpen(Gravity.START)
|
||||
.doOnNext {
|
||||
dismissKeyboard()
|
||||
inbox.requestFocus();
|
||||
}
|
||||
}
|
||||
override val homeIntent: Subject<Unit> = PublishSubject.create()
|
||||
override val navigationIntent: Observable<NavItem> by lazy {
|
||||
|
||||
@@ -286,7 +286,10 @@
|
||||
android:textColorHint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||
app:layout_constraintEnd_toStartOf="@id/sim"
|
||||
app:layout_constraintStart_toStartOf="@id/messageBackground" />
|
||||
app:layout_constraintStart_toStartOf="@id/messageBackground">
|
||||
|
||||
<requestFocus />
|
||||
</dev.octoshrimpy.quik.common.widget.QkEditText>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sim"
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
android:paddingBottom="8dp"
|
||||
android:nextFocusRight="@+id/compose">
|
||||
|
||||
<dev.octoshrimpy.quik.common.widget.GroupAvatarView
|
||||
android:id="@+id/avatars"
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:animateLayoutChanges="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -62,7 +60,10 @@
|
||||
android:paddingEnd="16dp"
|
||||
android:textColorHint="?android:attr/textColorTertiary"
|
||||
app:textSize="primary"
|
||||
tools:textSize="16sp" />
|
||||
tools:textSize="16sp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:nextFocusRight="@+id/compose" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user