Files
AndroidIDE/app/src/main/res/layout/activity_editor.xml
T
2023-03-28 19:17:10 +05:30

135 lines
5.4 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<com.itsaky.androidide.ui.ContentTranslatingDrawerLayout 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/editor_drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
tools:ignore="DuplicateIncludedIds">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/realContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/editor_appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$Behavior">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/editor_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="10dp" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/build_progress_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
style="@style/AppTheme.TabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="start" />
</com.google.android.material.appbar.AppBarLayout>
<ViewFlipper
android:id="@+id/view_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"
android:background="?attr/colorSurface"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<!--Views in this flipper are dynamically added and must be instances of CodeEditorView-->
<ViewFlipper
android:id="@+id/editor_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/editor_sheet_peek_height"
android:background="?attr/colorSurface" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/no_editor_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
android:textColor="?attr/colorOnSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.4" />
<TextView
android:id="@+id/no_editor_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
android:textColor="?attr/colorSecondaryVariant"
android:textSize="13sp"
app:layout_constraintEnd_toEndOf="@id/no_editor_title"
app:layout_constraintStart_toStartOf="@id/no_editor_title"
app:layout_constraintTop_toBottomOf="@+id/no_editor_title"
tools:text="Open right drawer for files\nSwipe from bottom for build output" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ViewFlipper>
<com.itsaky.androidide.ui.EditorBottomSheet
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_hideable="false"
app:behavior_peekHeight="@dimen/editor_sheet_peek_height"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
<include
android:id="@+id/diagnosticInfo"
layout="@layout/layout_diagnostic_info" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/startNav"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/layout_nav_header"
app:menu="@menu/menu_editor_nav" />
<com.google.android.material.navigation.NavigationView
android:id="@+id/endNav"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:fitsSystemWindows="false">
<!-- When changing android:tag here, also change it in FileTreeFragment.kt -->
<androidx.fragment.app.FragmentContainerView
android:id="@+id/file_tree"
android:name="com.itsaky.androidide.fragments.FileTreeFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="editor.fileTree" />
</com.google.android.material.navigation.NavigationView>
</com.itsaky.androidide.ui.ContentTranslatingDrawerLayout>