Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥

Akexorcist akexorcist

🔥
View GitHub Profile
@akexorcist
akexorcist / GroupFocusableEditText.kt
Last active Oct 8, 2021
Custom Android UI for prevent the view behind on-screen keyboard when edit text is focused
View GroupFocusableEditText.kt
import android.content.Context
import android.graphics.Point
import android.graphics.Rect
import android.util.AttributeSet
import android.view.View
import androidx.appcompat.widget.AppCompatEditText
class GroupFocusableEditText : AppCompatEditText {
private var parentRect = Rect()
@akexorcist
akexorcist / QuadGradientView.kt
Created Oct 5, 2021
Gradient color view for HSL color picker
View QuadGradientView.kt
class QuadGradientView : FrameLayout {
private var currentHue = 0f
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
setWillNotDraw(false)
}
constructor(context: Context) : super(context) {
setWillNotDraw(false)
}
@akexorcist
akexorcist / MaterialButtonGroup.kt
Last active Oct 26, 2021
Material Button Group for Material Button in Android
View MaterialButtonGroup.kt
package com.akexorcist.materialdesign
import android.content.Context
import androidx.core.view.MarginLayoutParamsCompat
import androidx.core.view.ViewCompat
import android.util.AttributeSet
import android.util.Log
import android.view.View
import android.widget.LinearLayout
import com.google.android.material.shape.AbsoluteCornerSize
@akexorcist
akexorcist / view_constraint_layout_issue.xml
Last active Apr 28, 2021
Mystery issue in ConstraintLayout 2.0.2
View view_constraint_layout_issue.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp">
<androidx.constraintlayout.widget.ConstraintLayout
@akexorcist
akexorcist / device_list.txt
Last active May 11, 2021
Android Device List in Firebase Test Lab [11-05-2021] from `gcloud firebase test android models list`
View device_list.txt
┌───────────────────┬────────────────────┬─────────────────────────────────────┬──────────┬─────────────┬─────────────────────────┬─────────────────────┐
│ MODEL_ID │ MAKE │ MODEL_NAME │ FORM │ RESOLUTION │ OS_VERSION_IDS │ TAGS │
├───────────────────┼────────────────────┼─────────────────────────────────────┼──────────┼─────────────┼─────────────────────────┼─────────────────────┤
│ 1805 │ Vivo │ vivo 1805 │ PHYSICAL │ 2316 x 1080 │ 27 │ │
│ 602SO │ Sony │ 602SO │ PHYSICAL │ 1080 x 1920 │ 26 │ │
│ 801SO │ Sony │ 801SO │ PHYSICAL │ 2880 x 1440 │ 28 │ │
│ AOP_sprout │ HMD Global │ Nokia 9 │ PHYSICAL │ 2880 x 1
@akexorcist
akexorcist / android.yml
Last active Apr 5, 2021
Android CI Workflow for GitHub Actions - Run UI Test on Firebase Test Lab
View android.yml
# ...
jobs:
test:
# ...
apk:
# ...
firebase:
name: Run UI tests with Firebase Test Lab
needs: apk
@akexorcist
akexorcist / android.yml
Last active Apr 3, 2021
Android CI Workflow for GitHub Actions - Build APK for UI Test
View android.yml
# ...
jobs:
test:
# ...
apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@akexorcist
akexorcist / android.yml
Created Apr 3, 2021
Android CI Workflow for GitHub Actions - Unit Test Job
View android.yml
#...
jobs:
test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
@akexorcist
akexorcist / android.yml
Created Apr 3, 2021
Android CI Workflow for GitHub Actions - Initial
View android.yml
name: Android CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
@akexorcist
akexorcist / android.yml
Created Apr 1, 2021
Android CI + FIrebase Test Labs
View android.yml
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test: