Skip to content

Instantly share code, notes, and snippets.

View arunavo4's full-sized avatar
🏠
Working from home

ARUNAVO RAY arunavo4

🏠
Working from home
View GitHub Profile
import android.app.Application
import androidx.databinding.Observable
import androidx.databinding.PropertyChangeRegistry
import androidx.lifecycle.AndroidViewModel
abstract class ObservableViewModel(app: Application): AndroidViewModel(app), Observable {
@delegate:Transient
private val mCallBacks: PropertyChangeRegistry by lazy { PropertyChangeRegistry() }
@arunavo4
arunavo4 / c_sharp_for_python.md
Last active September 20, 2020 18:40 — forked from mrkline/c_sharp_for_python.md
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

@arunavo4
arunavo4 / NestedScrollWebView.java
Created November 18, 2018 10:27 — forked from alexmiragall/NestedScrollWebView.java
NestedWebView compatible with CoordinatorLayout
package com.tuenti.nestedwebscrollview;
import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingChild;
import android.support.v4.view.NestedScrollingChildHelper;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.VelocityTrackerCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.ScrollerCompat;
@arunavo4
arunavo4 / GetStatusBarHeight.java
Created October 15, 2018 14:18 — forked from stephenparish/GetStatusBarHeight.java
Get android status bar height
public int getStatusBarHeight() {
int result = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = getResources().getDimensionPixelSize(resourceId);
}
return result;
}