Fading Coder

One Final Commit for the Last Sprint

Implementing Ripple Effects for Android Buttons

For rectangular buttons, use the selectableItemBackground attribute in the foreground to apply a default ripple effect. <TextView android:id="@+id/btn_submit" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#06CD5D&qu...

Implementing Rounded Rectangles with Custom Views in Android

To create a custom rounded rectangle view in Android, you must extend the View class and override its drawing methods. First, define a new class that inherits from View. Provide the necessary constructors to handle different instantiation contexst. // RoundedRectView.java public class RoundedRectVie...

Android USB Redirection: Permission Models and Dual-Path Implementation Strategies

Introduction In cloud computing scenarios, Android terminals serve as more than just display and input interfaces. Users often connect USB peripherals such as flash drives, printers, barcode scanners, and serial devices to their phones, tablets, or cloud laptops, expecting these local devices to fun...

Building a Homestay Booking System for Android with Spring Boot

This article outlines the development of a homestay booking application for the Android platform. The system is designed to provide users with a mobile interface for browsing available accommodations, viewing announcements, and managing bookings. It serves three primary user roles: administrators, g...

Managing Runtime Permissions in Android Applications

Android applications operate within a restricted sandbox. Accessing resources or information outside this sandbox requires requesting specific permissions. This is done by declaring the permission in the app's manifest and, for Android 6.0 (API level 23) and higher, requesting user approval at runti...

Smali Syntax and Class Structure Reference

Dalvik bytecode executes on a register-based VM. Each virtual registre is 32 bits wide; 64‑bit primitives (long, double) consume a pair of adjacent registers. Smali is the human-readable assembly for Dalvik, while baksmali is its decompiler. 1. Types in Dalvik/Smali Primitive type descriptors: Code...

Android Serial Communication via JNI: Native UART Access and Java Integration

Native layer (UartPort.cpp) #include <jni.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> #include <sys/types.h> #include <sys/stat.h> #include <android/log.h> #include <string.h> #define LOG_TAG "uart_port" #define LOGI(...) _...

Implementing an Immersive Status Bar with the Android SlidingMenu Library

Import the SlidingMenu library iether as a libray module referenced by your app module or by copying the library’s source into your project. After adding the dependency, initialize and attach SlidingMenu to an Activity and configure left-edge sliding, shadow, and fade. Java: create a small initializ...

Implementing an Android Virtual Camera That Multiplexes a Physical Sensor Across Multiple Apps

Android’s camera stack enforces single-owner semantics, which prevents multiple processes from using the same sensor concurrently. A virtual camera layer can fan out frames from one physical device to many clients by routing frames through shared memory and exposing an additional HAL camera device t...

Building a Minimal 2048 Clone on Android with a Custom Grid View

A 4×4 grid, a minimal score panel, and a custom view implement the full 2048 interaction loop: spawn, slide, merge, score, and game-over detection. Layout is defined in XML, while swipe handling and game rules live in a GridLayout-backed custom view. activity_main.xml <?xml version="1.0"...