Skip to content

Instantly share code, notes, and snippets.

🏋️‍♀️
Try Harder

Lopez Mikhael lopspower

🏋️‍♀️
Try Harder
Block or report user

Report or block lopspower

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lopspower
lopspower / ViewModel.kt
Last active Feb 14, 2018
ViewModel Kotlin Android Studio Template
View ViewModel.kt
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import com.mstv.presentation.scenes.base.view.ContentState
import com.mstv.presentation.scenes.base.view.LoadingState
data class ${NAME}(val loadingState: LoadingState = LoadingState.NONE,
val contentState: ContentState = ContentState.NONE,
val data: ${DataType}? = null,
val errorMessage: String? = null,
val snackMessage: String? = null) {
@lopspower
lopspower / RecyclerViewAdapter.kt
Last active Dec 6, 2019
RecyclerView Adapter Kotlin Android Studio Template
View RecyclerViewAdapter.kt
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import java.util.*
class ${NAME} : RecyclerView.Adapter<${Model}Adapter.ViewHolder>() {
@lopspower
lopspower / README.md
Last active Sep 16, 2019
Custom Logcat Color
View README.md

Custom Logcat Color

Twitter

  • ASSERT -> #FF6B68
  • DEBUG -> #3D9D2A
  • ERROR -> #D80D15
  • INFO -> #B7AB4C
@lopspower
lopspower / README.md
Last active Nov 19, 2019
Android studio format code auto break line
View README.md

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 May 27, 2016
Android Supported Language
View README.md

Android Supported Language

Twitter

Language / Country Folder extension name
@lopspower
lopspower / README.md
Last active Jul 19, 2019
All InputType for EditText
View README.md

All InputType for EditText

Twitter

Constant Description
none There is no content type. The text is not editable.
@lopspower
lopspower / README.md
Last active Dec 9, 2019
Hexadecimal color code for transparency
View README.md

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.

Download This sample on Google Play Store

@lopspower
lopspower / README.md
Last active Nov 25, 2019
Android Tools Attributes
View README.md

Android Tools Attributes

Twitter

Android has a dedicated XML namespace intended for tools to be able to record information in XML files, and have that information stripped when the application is packaged such that there is no runtime or download size penalty. The namespace URI is http://schemas.android.com/tools and is usually bound to the tools: prefix:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
@lopspower
lopspower / REAMDE.md
Last active Sep 22, 2019
Increase Android Studio memory
View REAMDE.md

Increase Android Studio memory

Twitter

Locate the configuration file

Run command:

touch ~/Library/Preferences/AndroidStudioX.X/studio.vmoptions
@lopspower
lopspower / README.md
Last active Feb 24, 2016
Add JAVA 1.8 with Retrolambda
View README.md

Add JAVA 1.8 with Retrolambda

Twitter

In build.gradle (Project):

buildscript {
    //...
You can’t perform that action at this time.