Editor UI

When you create a new project or open an existing one, AndroidIDE welcomes you to the Editor UI. This guide walks you through the key components of the Editor, enhancing your understanding and efficiency while coding.

1. Code Editor:
  • The central area where you write and edit your code.

  • Supports syntax highlighting for various programming languages.

  • Features autocompletion and intelligent code actions.

2. File Explorer:
  • Located on the left sidebar, it displays the project structure.

  • Easily navigate and manage project files and directories.

3. Toolbar:
  • Located at the top, it provides quick access to essential actions and tools.

  • Includes buttons for build, run, and other editor-related operations.

4. Navigation Bar:
  • Positioned at the top, it aids in quick navigation within the file.

  • Displays the current file path and allows easy switching between files.

6. Console and Logcat:
  • Located at the bottom, these panels display build outputs, errors, and log information.

  • Essential for debugging and troubleshooting.

7. Status Bar:
  • At the bottom, it provides information about the current project build status, errors, and other notifications.

Navigating the Editor:
  • Use keyboard shortcuts for efficient navigation.

  • Utilize the context menu for file and code-related actions.

  • Customize the editor settings to match your preferences.

Refer to the comprehensive documentation for detailed information on each component and advanced editor functionalities.

Options Menu

In the top-right corner of the AndroidIDE interface, you’ll find the options menu, represented by three dots (). This menu provides essential functionalities to enhance your development experience.

Options Menu Functionalities:

  1. Quick Run (▷):

  • Executes assemble task on the selected build variant and installs the APK for that variant, if permission is granted. If the REQUEST_INSTALL_PACKAGES is not granted to AndroidIDE, you will be asked to grant the permission in order to continue.

  1. Run Tasks:

  • Select and run various Gradle tasks. Refer to the [Build Actions](build-actions) link for detailed information.

  1. Find:

  • Find in File: Locate and replace text within the opened file.

  • Find in Project: Search across all project modules with filter options based on file extensions.

  1. File Tree:

  • Opens the project’s file tree. Also accessible by swiping left from the edge. Learn more [here](#the-file-tree).

  1. Cancel Build:

  • Cancels ongoing build actions.

  1. Sync Project:

  • Manually syncs the project, useful for changes in project configuration files.

Utilizing the Options Menu:

  • Access the menu by clicking the three dots () in the top-right corner.

  • Efficiently execute common tasks without navigating through multiple menus.

  • Cancel ongoing build actions when needed.

The file tree

The file tree in the left navigation drawer of AndroidIDE is a hierarchical representation of your project files. Presented in a tree format, it allows for easy navigation and management of project resources.

Navigating the File Tree:

  • Display Format: - Presented in a tree structure for organized visibility. - Easily locate and explore project files and directories.

  • Opening Files: - Click on any file in the tree to open it directly in the editor. - Streamlined access to view and edit individual files.

File Actions:

  • Long-Clicking:

    • Long-click on a file or folder to reveal a context menu with actions specific to the selected item.

    • Enables quick access to various file and folder operations.

Bottom sheet

The bottom sheet in AndroidIDE serves as a comprehensive tool for accessing crucial information related to Gradle builds, app logs, IDE logs, and more. Easily expandable by sliding or a simple click, it provides a detailed overview of various build processes.

Bottom Sheet Sections:

  1. Build Output: - Displays the build output generated by the Gradle build process. - Highlights project-related build issues for quick identification.

  2. App Logs: - For debug builds, AndroidIDE integrates the LogSender API. - Continuously sends logs from your application to AndroidIDE. - This tab showcases received logs for analysis.

  3. IDE Logs: - Exhibits logs from the IDE, offering insights into IDE activities. - Aids in understanding and troubleshooting IDE-related errors.

  4. Code Analysis:

  • Identifies syntax problems in the currently opened file in the code editor.

  • Presents errors and warnings to facilitate code improvement.

  1. Search Results:

  • Displays results from various search actions, including Find in Project, Find in File, and Find References.

  • Streamlines the navigation through search outcomes.

Navigating the Bottom Sheet:

  • Expand the bottom sheet by sliding it up or clicking on it.

  • Easily switch between different tabs to access specific information.

Utilizing Bottom Sheet Information:

  • Analyze build outputs for quick issue resolution.

  • Review app logs for debugging and performance optimization.

  • Monitor IDE logs for insights into IDE-related activities.

  • Enhance code quality by addressing syntax problems highlighted in the code analysis tab.

  • Efficiently navigate search results for code exploration.

Code editor

AndroidIDE utilizes sora-editor as its robust code editor. Powered by tree sitter for fast and incremental parsing, the editor enhances your coding experience with a multitude of features.

1. Syntax Highlighting:
  • Lexers generated using tree sitter and ANTLR4 for select languages.

  • Facilitates precise syntax highlighting for effective code comprehension.

  • Utilizes our Java bindings for tree sitter available at android-tree-sitter.

2. Default Key Bindings:
  • Supports default key bindings for physical keyboards (and some supported virtual keyboards), similar to Android Studio/IntelliJ IDEA. View the [supported keybindings](key-bindings) for reference.

3. Text Selection Window:
  • Selecting text in the editor reveals a compact window for actions like Select All, Cut, Copy, Paste, etc.

  • Anchored to the selection handles for convenient access.

4. Code Actions:
  • Within the [text actions window](#text-actions), find Code Actions for file-specific tasks and diagnostics-related actions.

  • Provided by language servers, offering actions such as Fix imports, Generate toString(), Generate constructor, etc.

5. Custom Color Schemes:
  • Define personalized color schemes in JSON files to tailor the editor’s appearance. Learn more [here](color-schemes).

6. Code Snippets:
  • Supports code snippets for Java, offering pre-defined code pieces in the code completion window for seamless insertion.

Optimizing Your Editing Experience:
  • Explore key bindings for efficient navigation and editing.

  • Leverage text selection window for quick text manipulations.

  • Access code actions for enhanced file-specific tasks.ustom color schemes for a personalized editor appearance.