Skip to content

Instantly share code, notes, and snippets.

View harshmittal2810's full-sized avatar

Harsh Mittal harshmittal2810

  • Mumbai
View GitHub Profile
@harshmittal2810
harshmittal2810 / Android-New-UI-style-guide.md
Last active July 4, 2022 08:30
Android New UI style guide for implementing new style

This article contains all the basic components with minimal attributes to be used in our JioMeet. As we defined all the style attributes in themes, we don't need to define some of the duplicated attributes (like font, text size, textColor, corners, corner family, background, and some other attributes) again in the layout XML.

In order to apply the new UI theme for any activity, use Theme.App.NewUi for your activity in manifest.

Note: All the resources related to any module should be within that source package.

image-34c46419-070b-4562-9df7-cac5cc79e276

Ex: All the dashboard resources should be in the package/dashboard directory.

import android.R
import android.content.Context
import android.util.AttributeSet
import android.view.ActionMode
import android.view.Menu
import android.view.MenuItem
import android.view.MotionEvent
import android.widget.TextView
import androidx.appcompat.widget.AppCompatEditText
import java.lang.reflect.Field
name: Release app > Playstore
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
default_platform(:android)
platform :android do
desc "Deploy a beta version to the Google Play"
lane :beta do
gradle(task: "clean bundleRelease")
upload_to_play_store(track: 'beta')
end
name: Push App to Firebase
on:
push:
branches:
- stable
jobs:
build:
runs-on: ubuntu-latest
@harshmittal2810
harshmittal2810 / ImageCompressor.kt
Created January 31, 2021 15:48
ImageCompressor with keeping image in exact rotating position
object ImageCompressor {
/**
* This doesn't compress the original image file.
* It compresses the bitmap and updates it to the new file and returns from app cache
*/
@Throws(Exception::class)
fun compressBitmap(context: Context, originalImageFile: File): File {
val bitmap = updateDecodeBounds(originalImageFile)
val file = context.getPicturesFile(originalImageFile.name)
val fOut = FileOutputStream(file)
####################################################################################################
####################################################################################################
####################################################################################################
######################################### PROGUARD #################################################
####################################################################################################
####################################################################################################
####################################################################################################
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
android {
buildtypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}