Skip to content

Instantly share code, notes, and snippets.

View evasyuk's full-sized avatar

Yevhenii Vasiuk evasyuk

View GitHub Profile
public class customViewGroup extends ViewGroup {
public customViewGroup(Context context) {
super(context);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
}
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g phonegap
___
build
___
curl -sL https://deb.nodesource.com/setup | sudo bash -
https://groups.google.com/forum/#!topic/android-porting/yK17XZXkupI/discussion
http://www.slideshare.net/pickerweng/android-camera-architecture-8098156
1. download depot-tools
2. unzip it
3. export PATH=$PATH:"your path"
4. even if step 3 failed, use "your full path"/depot_tools/fetch webrtc_android
5. step 4 would create "src" folder in your currently setted up folder
>> now you have sources of your webrtc copy
6. go to README.md
7.
8.
9.
@evasyuk
evasyuk / AndroidManifest.xml
Last active October 23, 2015 13:57
quick cheat-paper for GCM setup
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.genyware.whereareyou"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="15"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
@evasyuk
evasyuk / com.genyware.core.App.java
Created October 19, 2015 14:55
Android BUS pattern + utility gist
package com.genyware.core;
//missed
public class App extends Application implements Bus.Subscriber {
public static TManager tm;
private static App self;
public static App getInstance() {
@evasyuk
evasyuk / Mulitiple_Items_Adapter.java
Created August 11, 2015 07:17
ListView with ITEM_TYPE_COUNT > 1
>>ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView
Romain Guy said:
The item view type you are returning from
getItemViewType() is >= getViewTypeCount().
from http://stackoverflow.com/questions/2596547/arrayindexoutofboundsexception-with-custom-android-adapter-for-multiple-views-in
>>Creating ViewHolders for ListViews with different item layouts
@evasyuk
evasyuk / CircleTransform.java
Last active August 29, 2015 14:26 — forked from julianshen/CircleTransform.java
CircleTransform for Picasso
/*
* Copyright 2014 Julian Shen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
scroll.setOnTouchListener(new OnTouchListener()
{
private int mLastY;
public boolean onTouch(View v, MotionEvent event)
{
switch (event.getAction())
{
case MotionEvent.ACTION_DOWN: //the user places his finger on the screen
mLastY=(int)event.getY(); //to get the "y" position starting
break;