Files
AndroidIDE/app/src/main/res/layout/activity_editor.xml
T

136 lines
5.5 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"
android:background="?attr/colorSurfaceDim"
tools:ignore="DuplicateIncludedIds">
<com.itsaky.androidide.ui.SwipeRevealLayout
android:id="@+id/swipe_reveal"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:dragHandle="@id/editor_appBarLayout">
<include android:id="@+id/mem_usage_view" layout="@layout/layout_mem_usage" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/realContainer"
android:background="?attr/colorSurface"
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:fitsSystemWindows="false"
android:background="@android:color/transparent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$Behavior">
<com.itsaky.androidide.ui.ExtendedMenuToolbar
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/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"
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" />
<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.itsaky.androidide.ui.SwipeRevealLayout>
<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:elevation="8dp">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/drawer_sidebar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.itsaky.androidide.fragments.sidebar.EditorSidebarFragment" />
</com.google.android.material.navigation.NavigationView>
</com.itsaky.androidide.ui.ContentTranslatingDrawerLayout>