Skip to content

Instantly share code, notes, and snippets.

View agustinsivoplas's full-sized avatar

Agustin Sivoplás agustinsivoplas

  • Montevideo, UY
View GitHub Profile
import android.app.Activity
import android.graphics.Rect
import android.os.Build
import android.view.View
import android.view.ViewTreeObserver
import android.view.inputmethod.InputMethodManager
/**
* Created by mikepenz on 14.03.15.
* This class implements a hack to change the layout padding on bottom if the keyboard is shown
<html>
<body>
</br>
</br>
<p>Communication Test</p>
<input type="button" value="Send Token" onclick="__external.postMessage('sendToken', 'ajkdshaskj8979867');"/>
<input type="button" value="Set Cart Items" onclick="__external.postMessage('setCartItemsNumber', '2');"/>
</body>
<script>
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
RxJavaPlugins.getInstance().registerErrorHandler(new RxJavaErrorHandler() {
@Override
public void handleError(Throwable e) {
Log.e("UnhandledError", e.getMessage(), e);
{
"_id": {
"$oid": "5814df7131c68016b421e7c8"
},
"business_id": "zaXDakTd3RXyOa7sMrUE1g",
"full_address": "202 3rd Ave\nCarnegie\nCarnegie, PA 15106",
"hours": {
"Monday": {
"close": "14:00",
"open": "07:00"
@BindView(R.id.button)
AppCompatButton button;
CompositeSubscription compositeSubscription;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_reachout);
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/content_main"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.target.Target;
import java.io.FileOutputStream;
import java.io.IOException;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LightingColorFilter;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
@agustinsivoplas
agustinsivoplas / activity.java
Created February 22, 2016 16:09
refreshNavigationBar method
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
refreshNavigationBar();
}
protected void refreshNavigationBar() {
List<NavigationItem> items = new ArrayList<NavigationItem>();
try {
for (final Course course : courseManager.getActiveCourses()) {