Skip to content

Instantly share code, notes, and snippets.

View lopspower's full-sized avatar
💚
Android Lover

Lopez Mikhael lopspower

💚
Android Lover
View GitHub Profile
@lopspower
lopspower / README.md
Last active May 6, 2026 09:03
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@lopspower
lopspower / README.md
Last active May 3, 2026 06:12
Android studio format code auto break line

Android studio format code auto break line

Twitter

To do this in Android Studio go to Preferences > Editor > Code Style

and set Right margin (columns) to 150 (or the line width you want)

Now go to File -> Settings > Editor > Code Style > Java > Wrapping and Braces

@lopspower
lopspower / README.md
Last active March 25, 2026 13:19
All Android Directory Path

All Android Directory Path

Twitter

1) System directories

⚠️ We can't write to these folers

Method Result
@lopspower
lopspower / README.md
Last active February 1, 2026 06:28
How to Analyze & Manage Memory on Android Like a Boss

Analyze & Manage Memory on Android Like a Boss

This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.

Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.

Memory Management in Android

Android is a Linux based operating system. It uses native open source C libraries which power Linux machines. All the basic operating system operations like I/O, memory management and so on are handled by the Linux kernel. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the lifetime processes. Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memo

@lopspower
lopspower / 1-README.md
Last active January 27, 2026 11:27
Android M Permissions

Android M Permissions

Twitter

1) Android Permissions

Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. This approach streamlines the app install process, since the user does not need to grant permissions when they install or update the app. It also gives the user more control over the app's functionality; for example, a user could choose to give a camera app access to the camera but not to the device location. The user can revoke the permissions at any time, by going to the app's Settings screen.

Normal and Dangerous Permissions

@lopspower
lopspower / README.md
Last active October 2, 2025 17:34
Material Animations

Material Animations

Android Arsenal

[Android Transition Framework][transition-framework] can be used for three main things:

  1. Animate activity layout content when transitioning from one activity to another.
  2. Animate shared elements (Hero views) in transitions between activities.
  3. Animate view changes within same activity.
@lopspower
lopspower / README.md
Last active May 1, 2025 10:36
Custom Logcat Color

Custom Logcat Color

Twitter

  • ASSERT -> #FF6B68
  • DEBUG -> #3D9D2A
  • ERROR -> #D80D15
  • INFO -> #B7AB4C
@lopspower
lopspower / README.md
Last active February 8, 2025 22:00
What's difference between -nodpi and -anydpi?

Difference between -nodpi and -anydpi

Android Studio exposes developers to -nodpi and -anydpi in various places. For example, if you use the New Resource Directory wizard thing, and you choose to add a density qualifier to the directory, you will see "No Density" (-nodpi) and "Any Density" (-anydpi) options.

Some of you might expect these to be well-documented.

In a word, no.

However, courtesy of a fair amount of experimentation (largely done as part of work on this Stack Overflow question and this answer), their use becomes at least a bit clearer. Many thanks to Stack Overflow user rds for the help!

@lopspower
lopspower / REAMDE.md
Last active August 18, 2024 02:34
Increase Android Studio memory

Increase Android Studio memory

Twitter

Locate the configuration file

Run command:

touch ~/Library/Preferences/AndroidStudioX.X/studio.vmoptions
@lopspower
lopspower / README.md
Last active June 26, 2024 08:36
Android Supported Language

Android Supported Language

Twitter

Folder extension name
Language / Country