Skip to content

Instantly share code, notes, and snippets.

🌏
Code • Jam • Shoot | Repeat

AndroCurious RahulSDeshpande

🌏
Code • Jam • Shoot | Repeat
Block or report user

Report or block RahulSDeshpande

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
@abhaysood
abhaysood / medium_rider_redesign_blog_example.kt
Created Mar 18, 2018
A simple component which is created when user clicks the cancel order button in the app. It is responsible for showing a confirmation dialog and actually cancelling the order by making an API call.
View medium_rider_redesign_blog_example.kt
class OrderCancellationComponent(private val context: Context,
private val api: Api,
private val orderNumber: String) {
interface Callbacks {
fun onOrderCancelledSuccessfully()
fun onOrderCancellationFailed()
}
var callbacks: Callbacks? = null // Callbacks for communication with the parent component
View SplashActivity.kt
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
class SplashActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
// Make sure this is before calling super.onCreate
setTheme(R.style.AppTheme)
super.onCreate(savedInstanceState)
@ryneli
ryneli / gist:bc4ea5b679a75b940a44d4bc967e2f54
Created May 2, 2017
android elevation translationz on ImageView
View gist:bc4ea5b679a75b940a44d4bc967e2f54
v.setOutlineProvider(ViewOutlineProvider.BOUNDS);
v.setElevation(10.0);
v.setTranslationZ(10.0);
@faruktoptas
faruktoptas / KeyboardSensitiveRelativeLayout.java
Last active Jan 18, 2019
A layout that detects Soft Keyboard is visible or not.
View KeyboardSensitiveRelativeLayout.java
public class KeyboardSensitiveRelativeLayout extends RelativeLayout {
private OnKeyboardShowHideListener listener;
public KeyboardSensitiveRelativeLayout(Context context) {
super(context);
}
public KeyboardSensitiveRelativeLayout(Context context, AttributeSet attrs) {
super(context, attrs);
@SeanJM
SeanJM / generateId.ts
Last active Sep 20, 2017
A TypeScript function to generate a random ID
View generateId.ts
interface ILib {
alpha: string[],
number: string[],
symbols: string[]
}
type Key = keyof ILib;
const lib : ILib = {
alpha: [
@oldergod
oldergod / XmlOrJsonConverterFactory.java
Last active Jun 4, 2018
Retrofit: Xml or Json converter
View XmlOrJsonConverterFactory.java
public class XmlOrJsonConverterFactory extends Converter.Factory {
final Converter.Factory xml = SimpleXmlConverterFactory.create();
final Converter.Factory gson = GsonConverterFactory.create();
@Override
public Converter<ResponseBody, ?> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
// Retrofit gives us all the annotations so we just need to check
for (Annotation annotation : annotations) {
@ismailmechbal
ismailmechbal / sketch-never-ending.md
Last active Jul 22, 2019
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
@Bhavdip
Bhavdip / sketch-never-ending.md
Created Oct 6, 2016
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
View app.build.gradle
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "samples.linhtruong.com.ui_reactive_rxjava_realm"
minSdkVersion versions.minSdk
You can’t perform that action at this time.