Skip to content

Instantly share code, notes, and snippets.

Bartosz Kosarzycki kosiara

Block or report user

Report or block kosiara

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
@kosiara
kosiara / proguard-rules.pro
Created Nov 3, 2015
RxJava RxAndroid Proguard rules
View proguard-rules.pro
#build.gradle
#
# compile 'io.reactivex:rxandroid:1.0.1'
# compile 'io.reactivex:rxjava:1.0.14'
# compile 'io.reactivex:rxjava-math:1.0.0'
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0'
# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;
@kosiara
kosiara / gist:eec35300b92d8a3e92a9
Created Oct 23, 2015
Android Studio/ IntelliJ custom search scope without R.java classes with usual *.xml files from an Android project
View gist:eec35300b92d8a3e92a9
Edit->Find->Find in path
Custom -> ... -> Add scope
search pattern:
file:*java&&!file:*R.java*&&!file:*_.java||file:*strings.xml||file:*dimes.xml||file:*styles.xml||file:*attrs.xml||file:*colors.xml||file:*layout/*xml&&!file:*build/*xml
<component name="DependencyValidationManager"><scope name="PekaJavaWithoutRWithStrings" pattern="file:*java&&!file:*R.java*&&!file:*_.java||file:*strings.xml||file:*dimes.xml||file:*styles.xml||file:*attrs.xml||file:*colors.xml||file:*layout/*xml&&!file:*build/*xml"/></component>
@kosiara
kosiara / setup_howto.txt
Last active Apr 21, 2017
Setup Facebook React-native sample (empty) project on Ubuntu
View setup_howto.txt
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject
@kosiara
kosiara / HowTo.txt
Created Sep 22, 2015
Start Ubuntu docker image with a mounted directory
View HowTo.txt
Prerequisite: Install docker
> docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
@kosiara
kosiara / DoubleClickListenerImageButton.java
Created Sep 20, 2015
multiple OnClickListeners in one Android control (java class)
View DoubleClickListenerImageButton.java
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageButton;
/**
* Created by kosiara on 9/20/15.
*/
@kosiara
kosiara / HowToInstallGPOnAnEmulator.txt
Last active Oct 2, 2018
Android - Install Google Play Services / Google Play on android emulator
View HowToInstallGPOnAnEmulator.txt
1. Download Google Apps from basketbuild.com:
https://basketbuild.com/gapps
2. Extract GPE services apk files from the zip:
unzip -j gapps-lp-20150222-signed.zip system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk system/priv-app/GoogleLoginService/GoogleLoginService.apk system/priv-app/Phonesky/Phonesky.apk system/priv-app/GmsCore/GmsCore.apk -d ./
3. Start the emulator with the command:
/home/path/to/your/android/Sdk/tools/emulator -no-boot-anim -netdelay none -netspeed full -avd YOUR_EMULATOR_NAME
@kosiara
kosiara / MyAlphaInAnimationAdapter.java
Last active Jun 12, 2018
Android RecyclerView sequential items fade-in animation
View MyAlphaInAnimationAdapter.java
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class MyAlphaInAnimationAdapter extends MyAnimationAdapter {
private static final float DEFAULT_ALPHA_FROM = 0.0F;
private final float mFrom;
private RecyclerView recyclerView;
@kosiara
kosiara / ExplodeActivity.java
Created Mar 22, 2015
Android: Add scene transition animation to your project
View ExplodeActivity.java
public class ExplodeActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_explode);
}
}
@kosiara
kosiara / AndroidManifest.xml
Created Mar 21, 2015
Add Android Annotations to project
View AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.your.application.id">
<application
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
<activity
//change Activity class to generated class from AA
@kosiara
kosiara / InitActivity.java
Created Jul 21, 2014
Android slf4j logger with logcat + file; logging to file and logcat on Android
View InitActivity.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class InitActivity {
public InitActivity() {
logger.debug("Activity loading....");
}
You can’t perform that action at this time.