修复换行BUG
This commit is contained in:
parent
4f2f2c4f7e
commit
a2c721dd1d
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
/**
|
||||
* 编辑器左侧视图
|
||||
*/
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user