Implementing a Sliding Drawer with Android SlidingDrawer
The effect shown above (commonly seen in many apps) can be achieved using SlidingDrawer. Introduced in Android 1.5, the android.widget.SlidingDrawer class provides a simple way to create sliding drawer UI components.
SlidingDrawer Attributes
android:allowSingleTap: Indicates whether the drawer can be opened or closed by clicking the handle.
an ...
Posted on Mon, 17 Aug 2026 16:07:36 +0000 by gudushen
Eight Effective Strategies to Reduce Android APK Size
Dynamic feature modules allow you to deliver parts of your app on demand. Users can request these modules at runtime, reducing the initial download size.
modelManager.fetchModule("dynamic_feature")
.addOnFailureListener(e -> {
// Handle download failure
})
.addOnSuccessListener(sessionId -> {
// Modul ...
Posted on Sun, 16 Aug 2026 17:03:48 +0000 by mogster
Utilizing Legacy Flexbox (`-webkit-box`) in Older Android WebViews
Android WebViews prior to version 4.4 do not fully support the modern CSS Flexible Box Layout (display: flex). Instead, these environments rely on an older, prefixed specification: display: -webkit-box. Understanding this legacy syntax is crucial for ensuring layout compatibility on older Android devices.
The -webkit-box model applies specific ...
Posted on Sun, 16 Aug 2026 16:43:29 +0000 by IAK
Bridging Vue.js WebViews with Native Android Network Requests
Implementing a communication channel between a Vue.js application hosted in an Android WebView and native networking components requires a properly configured JavaScript bridge. The native layer handles HTTP operations on background threads and routes the results back to the JavaScript context.
Native Bridge Implementation
Create a dedicated cl ...
Posted on Sat, 15 Aug 2026 17:00:18 +0000 by AliceH
Android Application Development: Database Storage and Network Programming
SQLite Database Management
CRUD Operations Using SQL Statements
The SQLiteOpenHelper class manages database creation and version management. When calling getWritableDatabase() or getReadableDatabase(), the system creates the database if it doesn't exist and returns an existing database instance otherwise.
public class DatabaseActivity extends A ...
Posted on Fri, 14 Aug 2026 16:47:15 +0000 by fireMind
Adding Characters and Movement in TiledMap with libgdx
After creating the map, the next step is to introduce the main character. Since we've covered how to integarte TiledMap with the Stage, handling the character becomes straightforward.
We can create a character class by extending Actor, but for simplicity, I'll use Image instead.
Edit your TMX file and add an object layer.
Add a shape where the ...
Posted on Fri, 14 Aug 2026 16:11:23 +0000 by whitepony6767
Advanced Android Content Provider and File Access Techniques
Monitoring Content Changes with ContentObserver
The ContentObserver class provides a mechanism to track data modifications within a ContentProvider. By registering an observer with a specific URI, your application receives callbacks whenever the underlying dataset is updated.
public class SmsWatcher extends ContentObserver {
private final ...
Posted on Sun, 09 Aug 2026 16:21:28 +0000 by l_evans
Handling EditText Focus Loss on Outside Clicks in Android Fragments
When an EditText within an Android Fragment gains focus, users often expect tapping outside it to dismiss the keyboard and clear focus. This improves usability by allowing seamless interaction with other UI elements.
Implementation Approach
A common method involves setting a touch listener on the fragemnt's root view to detect clicks outside th ...
Posted on Sun, 09 Aug 2026 16:10:11 +0000 by zszucs
Android Date and Time UI Components
TextClock
The TextClock widget, introduced in Android 4.2 (API level 17), replaces the deprecated DigitalClock. It displays the current date and time as a formatted string and automatically adapts to the system's time format preference—either 12-hour or 24-hour.
To determine the active time format, use is24HourModeEnabled(). The component prior ...
Posted on Sat, 08 Aug 2026 16:31:50 +0000 by frih
Creating Interactive Hyperlinks in Android TextViews
Implementing URL Navigation via TextView1. Layout DeclarationAdd a text element within the XML layout resource.<TextView
android:id="@+id/hyperlinkView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorLink="#1E90FF"
android:text="Browse our official portal" />2. Constructing th ...
Posted on Fri, 07 Aug 2026 16:36:14 +0000 by Jibberish