mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-21 05:08:52 +01:00
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 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 showDeleteDialog( messages: List<Long>)
|
||||||
fun showClearCurrentMessageDialog()
|
fun showClearCurrentMessageDialog()
|
||||||
fun startSpeechRecognition()
|
fun startSpeechRecognition()
|
||||||
|
fun focusMessage()
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1101,7 +1101,7 @@ class ComposeViewModel @Inject constructor(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
.autoDisposable(view.scope())
|
.autoDisposable(view.scope())
|
||||||
.subscribe()
|
.subscribe{view.focusMessage()}
|
||||||
|
|
||||||
// View QKSMS+
|
// View QKSMS+
|
||||||
view.viewQksmsPlusIntent
|
view.viewQksmsPlusIntent
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import android.view.Menu
|
|||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewStub
|
import android.view.ViewStub
|
||||||
|
import android.widget.LinearLayout
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
@@ -89,8 +90,11 @@ class MainActivity : QkThemedActivity(), MainView {
|
|||||||
override val composeIntent by lazy { compose.clicks() }
|
override val composeIntent by lazy { compose.clicks() }
|
||||||
override val drawerOpenIntent: Observable<Boolean> by lazy {
|
override val drawerOpenIntent: Observable<Boolean> by lazy {
|
||||||
drawerLayout
|
drawerLayout
|
||||||
.drawerOpen(Gravity.START)
|
.drawerOpen(Gravity.START)
|
||||||
.doOnNext { dismissKeyboard() }
|
.doOnNext {
|
||||||
|
dismissKeyboard()
|
||||||
|
inbox.requestFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
override val homeIntent: Subject<Unit> = PublishSubject.create()
|
override val homeIntent: Subject<Unit> = PublishSubject.create()
|
||||||
override val navigationIntent: Observable<NavItem> by lazy {
|
override val navigationIntent: Observable<NavItem> by lazy {
|
||||||
|
|||||||
@@ -286,7 +286,10 @@
|
|||||||
android:textColorHint="?android:attr/textColorTertiary"
|
android:textColorHint="?android:attr/textColorTertiary"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
app:layout_constraintEnd_toStartOf="@id/sim"
|
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
|
<ImageView
|
||||||
android:id="@+id/sim"
|
android:id="@+id/sim"
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp"
|
||||||
|
android:nextFocusRight="@+id/compose">
|
||||||
|
|
||||||
<dev.octoshrimpy.quik.common.widget.GroupAvatarView
|
<dev.octoshrimpy.quik.common.widget.GroupAvatarView
|
||||||
android:id="@+id/avatars"
|
android:id="@+id/avatars"
|
||||||
|
|||||||
@@ -33,8 +33,6 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
app:contentInsetStartWithNavigation="0dp"
|
app:contentInsetStartWithNavigation="0dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -62,7 +60,10 @@
|
|||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:textColorHint="?android:attr/textColorTertiary"
|
android:textColorHint="?android:attr/textColorTertiary"
|
||||||
app:textSize="primary"
|
app:textSize="primary"
|
||||||
tools:textSize="16sp" />
|
tools:textSize="16sp"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:nextFocusRight="@+id/compose" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user