This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.RecyclerView.OnScrollListener; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.widget.AbsListView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CircularViewModifier extends ViewModifier { | |
private static final int CIRCLE_OFFSET = 500; | |
private static final float DEGTORAD = 1.0f / 180.0f * (float) Math.PI; | |
private static final float SCALING_RATIO = 0.001f; | |
private static final float TRANSLATION_RATIO = 0.09f; | |
@Override | |
void applyToView(final View v, final RecyclerView parent) { | |
final float halfHeight = v.getHeight() * 0.5f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sports.spornado.util.view; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v13.view.inputmethod.EditorInfoCompat; | |
import android.support.v13.view.inputmethod.InputConnectionCompat; | |
import android.support.v13.view.inputmethod.InputContentInfoCompat; | |
import android.support.v4.os.BuildCompat; | |
import android.util.AttributeSet; | |
import android.view.inputmethod.EditorInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FileUtils{ | |
@NotNull | |
public static File buildImageKeyboardSupportUri(@Nullable String extension) { | |
final long fileId = System.currentTimeMillis(); | |
String filePath = Environment.getExternalStorageDirectory().toString() + | |
"/keyboardImage/.shared/iks" + String.valueOf(fileId) + | |
(android.text.TextUtils.isEmpty(extension) ? "" : ("." + extension)); | |
checkAndCreateDir(filePath); | |
return new File(filePath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UriInfoLoader { | |
fun loadUriInfo(inputContentInfo: InputContentInfoCompat, context: Context): Single<File>? { | |
return Single.create<File> { emitter -> | |
val likUri = inputContentInfo.linkUri | |
val count = inputContentInfo.description.mimeTypeCount | |
var ext: String? = null | |
for (i in 0..count - 1) { | |
val mimetype = inputContentInfo.description.getMimeType(i) | |
if (!TextUtils.isEmpty(mimetype)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const HAIR_COLOR = Color.fromRGBO(22, 31, 56, 1); | |
const BG_COLOR = Color.fromRGBO(204, 217, 205, 1); | |
const LEAVES_COLOR = Color.fromRGBO(64, 144, 130, 1); | |
const HEART_COLOR = Color.fromRGBO(255, 102, 83, 1); | |
const GIRL_LIGHT_COLOR = Color.fromRGBO(255, 178, 149, 1); | |
const GIRL_DARK_COLOR = Color.fromRGBO(253, 157, 121, 1); | |
const GIRL_CHEEKS_COLOR = Color.fromRGBO(251, 127, 106, 1); | |
const GIRL_TSHIRT_COLOR = Color.fromRGBO(255, 236, 227, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class StreamLoadingMarchingAnts extends CustomPainter { | |
late double progress; | |
StreamLoadingMarchingAnts({required this.progress}); | |
final antPaint = Paint() | |
..strokeWidth = 2 | |
..strokeCap = StrokeCap.round |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am anmol92verma on github. | |
* I am oianmol (https://keybase.io/oianmol) on keybase. | |
* I have a public key ASDhcXl6t0yT1V4YFp25xcZOApoQwg-dq_VEUeDlz4DIsQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Some.MutableLiveData | |
class MyActivity { | |
private val button = Button() | |
val vm = MyViewModel() | |
fun onCreate(){ | |
vm.liveData.observe{value-> | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="abc_decor_view_status_guard">#ff000000</color> | |
<color name="abc_decor_view_status_guard_light">#ffffffff</color> | |
<color name="abc_search_url_text_normal">#7fa87f</color> | |
<color name="abc_search_url_text_pressed">@android:color/black</color> | |
<color name="abc_search_url_text_selected">@android:color/black</color> | |
<color name="accent_material_dark">@color/material_deep_teal_200</color> | |
<color name="accent_material_light">@color/material_deep_teal_500</color> | |
<color name="alert_default_error_background">#f44336</color> |
OlderNewer