A powerful Android overlay application that displays 7 adjustable lines on top of other apps. Perfect for designers, developers, and anyone who needs to align and compare visual elements on-screen. The lines adapt to device orientation and maintain their positions across app sessions.
- 7 Adjustable Lines: Each line has a distinct color and number for easy identification
- Orientation Aware:
- Landscape mode: Horizontal lines with draggable handles on both sides
- Portrait mode: Vertical lines (view-only, adjust in landscape)
- Free Movement: Lines can cross each other - no ordering constraints
- Persistent State: Line positions are automatically saved and restored between sessions
- True Overlay: Lines stay visible while you interact with other apps underneath
- Intuitive Controls:
- Numbered handles on both left and right sides in landscape mode
- Close button (×) always visible in bottom-right corner
- First-Run Guidance: Helpful instructions for first-time users
- Robust Error Handling: Automatic recovery from orientation changes and service restarts
- Minimal Battery Impact: Efficient foreground service implementation
- Android Studio Dolphin (2021.3.1) or newer
- Android SDK 33 (Tiramisu) or newer
- Minimum Android version supported: Android 8.0 (API level 26)
- Clone this repository
- Open the project in Android Studio
- Build the project using Gradle:
./gradlew assembleDebug
- The APK will be generated at
app/build/outputs/apk/debug/app-debug.apk
- Create an AVD (Android Virtual Device) in Android Studio with:
- API level 26 or higher
- Landscape orientation
- Start the emulator and install the app
- Run the app and grant the overlay permission when prompted
- Note: The app icon should appear in your app drawer after installation
- Enable Developer Options on your Android device:
- Go to Settings > About phone
- Tap on "Build number" 7 times to enable Developer Options
- Enable USB Debugging in Developer Options
- Connect your device to your computer and authorize the USB debugging connection
- Install the app using Android Studio or ADB:
adb install app/build/outputs/apk/debug/app-debug.apk
- Run the app and grant the overlay permission when prompted
To install the app directly on an Android device without using Android Studio:
- Build the APK on your development machine using the instructions above
- Enable installation from unknown sources on the Android device:
- For Android 8.0 or higher:
- Go to Settings > Apps > Special access > Install unknown apps
- Select the app you'll use to install the APK (e.g., Files, Chrome, or your file manager)
- Toggle "Allow from this source" to ON
- For Android 7.0 or lower:
- Go to Settings > Security (or Privacy)
- Enable "Unknown sources"
- For Android 8.0 or higher:
- Transfer the APK to the Android device using one of these methods:
- Email the APK to yourself and download it on the device
- Upload the APK to Google Drive or Dropbox and download it on the device
- Transfer using a USB cable and copy to device storage
- Share via Bluetooth or other sharing methods
- Install the APK:
- Navigate to the APK file using a file manager
- Tap on the APK file
- Follow the prompts to install
- When installation is complete, tap "Open" to launch the app
- Grant permissions:
- When you first try to use the line functionality, you'll be prompted to grant the overlay permission
- Follow the on-screen instructions to enable this permission
-
First Launch
- Open the app to see the welcome screen
- Read the brief introduction about the app's features
- Tap "Get Started" to proceed
-
Starting the Lines
- Tap the "Start Ruler" button
- The app will request permission to display over other apps
- Follow the on-screen instructions to grant the permission
- The line overlay will appear with 7 colored lines
- Portrait Mode: Lines appear vertically (top to bottom)
- Landscape Mode: Lines appear horizontally (left to right)
- Lines maintain their relative positions when rotating the device
- Each line has numbered handles on both left and right sides
- The number and color help identify each line (1-7)
- Touch and drag any handle to move that line
- Lines can freely cross over each other
- Positions are automatically saved after each adjustment
- The line overlay remains visible on top of all apps
- You can interact with apps underneath the lines
- Switch between apps normally - the lines stay in place
- Perfect for comparing alignments across different apps
- Tap the × button in the bottom-right corner (visible in any orientation)
- Or return to the Line App and tap "Stop Ruler"
- Line positions are saved when closing
- Rotate to landscape mode to adjust line positions
- Each line's number stays constant even when lines cross
- Line colors: Red (1), Orange (2), Gold (3), Green (4), Sky Blue (5), Violet (6), Magenta (7)
- The app automatically saves positions when you close it with the × button
- Lines are constrained to stay within screen boundaries with padding
This app requires the following permissions:
SYSTEM_ALERT_WINDOW
: To draw the lines over other appsFOREGROUND_SERVICE
: To keep the line service running reliablyFOREGROUND_SERVICE_SPECIAL_USE
: Required for Android 14+ overlay services
The app follows best practices for user privacy and only requests permissions that are essential for its core functionality.
- Line positions are saved in real-time as you adjust them
- Positions persist across app restarts and device reboots
- Lines can be freely arranged - they can overlap or cross each other
- Each line maintains its identity (number and color) regardless of position
- Clear error messages help you understand and resolve issues
- Automatic recovery from common error conditions
- Detailed logging for troubleshooting (in debug builds)
-
Lines not appearing
- Ensure you've granted the overlay permission
- Check that the line service is running (notification should be visible)
- Try stopping and starting the lines from the main app
-
Can't adjust lines
- Line adjustment only works in landscape mode
- Rotate your device to landscape orientation
- Look for the numbered handles on both sides of the screen
-
App icon not visible
- Check your app drawer (swipe up from home screen)
- Try searching for "Line App" or "Ruler App" in your device search
- The icon shows 7 colored horizontal lines
-
Can't interact with apps underneath
- This is normal - the overlay allows touch pass-through
- You can use other apps while the lines are visible
- Only the handles and close button capture touches
- Service-based: Uses a foreground service for reliable overlay display
- Dual-view system: Separate views for lines (non-interactive) and controls (interactive)
- Orientation handling: Proper configuration change management
- State persistence: SharedPreferences for storing line positions
- Minimum SDK: 26 (Android 8.0 Oreo)
- Target SDK: 33 (Android 13 Tiramisu)
- Tested on Android 8.0 through Android 14
- 7 adjustable colored lines with numbered handles for easy identification
- Orientation-aware display - horizontal lines in landscape, vertical in portrait
- Free line movement - lines can cross each other without constraints
- Touch pass-through - interact with apps beneath the overlay
- Persistent line positions - automatically saved and restored between sessions
- Landscape-only adjustment - drag handles appear only in landscape mode
- Visual improvements - gold color instead of bright yellow for better visibility
- Robust service implementation - handles rotation and lifecycle changes properly
- Launcher icon featuring 7 colored lines design
We welcome contributions! Please read our Contributing Guidelines for details on how to submit pull requests, report issues, or suggest new features.
This project is open source and available under the MIT License.