修复换行BUG

This commit is contained in:
muqing 2024-02-22 14:05:47 +08:00
parent 4f2f2c4f7e
commit a2c721dd1d
6 changed files with 4 additions and 91 deletions

View File

@ -32,8 +32,7 @@ android {
minSdkVersion 23
targetSdkVersion 33
versionCode 28
versionName "2.1.1 Bata6(2023-7-20)"
versionName "2.1.1 Bata6(2024-2-17)"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@ -124,11 +123,8 @@ dependencies {
annotationProcessor "androidx.room:room-compiler:2.4.0"
kapt "androidx.room:room-compiler:2.4.0"
//
// 使
implementation "dev.rikka.rikkax.preference:simplemenu-preference:1.0.3"
// Material Design 使
// Material Components
//
implementation "dev.rikka.rikkax.material:material-preference:2.0.0"

View File

@ -66,10 +66,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
private lateinit var turretCoordinateResults: ActivityResultLauncher<Intent>
private lateinit var rustLanguage: RustLanguage
private var fileAdapter: FileAdapter? = null
//是第一次启动嘛
private var isFirst = true
/**
* 编辑器左侧视图
*/

View File

@ -58,7 +58,8 @@ class RustLanguage() : Language, EnglishMode {
arrayOf(object : NewlineHandler {
override fun matchesRequirement(text: Content, position: CharPosition, style: Styles?): Boolean {
// 判断是否需要进行换行操作
return true
return false
}
override fun handleNewline(text: Content, position: CharPosition, style: Styles?, tabSize: Int): NewlineHandleResult {

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawerlayout"
android:layout_width="match_parent"
android:fitsSystemWindows="false"
android:layout_height="match_parent">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:visibility="gone">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已安装" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="模板社区" />
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<fragment
android:id="@+id/baseFragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/mainButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
android:fitsSystemWindows="true"
android:src="@drawable/add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/navaiagtion"
android:fitsSystemWindows="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:elevation="2dp"
app:menu="@menu/menu_drawer_left"
tools:ignore="VisualLintBounds" />
</androidx.drawerlayout.widget.DrawerLayout>

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".MainActivity">
tools:context=".">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"

View File

@ -5012,5 +5012,4 @@ public class CodeEditor extends View implements ContentListener, Formatter.Forma
public void onRemove(@NonNull Content content, @NonNull ContentLine line) {
layout.onRemove(content, line);
}
}