Skip to content

Instantly share code, notes, and snippets.

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

Gabriel Perez Gperez88

🏠
Working from home
  • Dominican Republic
View GitHub Profile
package com.t2r2.volleyexample
import com.android.volley.*
import com.android.volley.toolbox.HttpHeaderParser
import java.io.*
import kotlin.math.min
open class VolleyFileUploadRequest(
method: Int,
package com.t2r2.volleyexample
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.widget.Button
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import com.android.volley.Response
@miquelbeltran
miquelbeltran / pre-push
Created June 4, 2019 07:18
Flutter pre-push hook that runs analyze and test
#!/bin/sh
# To use add to `.git/hooks/`
# Should be named `pre-push`
# Make executable with `chmod +x`
# stash any unstaged changes
git stash -q --keep-index
# run Flutter analyze + test
flutter analyze
@jeroen-meijer
jeroen-meijer / firebase_storage_image.dart
Created May 13, 2018 00:34
A Flutter widget that handles and shows an image downloaded from a Firebase Storage document.
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error }
class FirebaseStorageImage extends StatefulWidget {
/// The reference of the image that has to be loaded.
final StorageReference reference;
/// The widget that will be displayed when loading if no [placeholderImage] is set.
@daniellevass
daniellevass / starting_library_project_AS.md
Last active August 30, 2020 00:48
Getting Started with a library project in Android Studio

Getting Started with a library project in Android Studio

So we're working on creating Android Material Awesome, a library which will hopefully incorperate the benefits of Material Design, Twitter's Bootstrap, and FontAwesome. What we really wanted is a project other people can easily include into their projects using gradle dependencies. To do this we needed to create a standalone library project so we could make it as lightweight as possible for including as a dependency, and a sample app that would use it for testing. These are the steps we took to get started in Android Studio (version 1.1).

Create Projects

The first thing we needed to do was to create two new projects, with all the default settings (Blank Activity etc). One for our sample app, and one for our library. We added both of ours into the same GitHub repo, however you can save them wherever you like.

Fix Up Library Project