Skip to content

Instantly share code, notes, and snippets.

View guuilp's full-sized avatar
😃
Hi!

Guilherme guuilp

😃
Hi!
View GitHub Profile
@guuilp
guuilp / activity_main.xml
Last active June 28, 2018 02:21
Constraint Layout DOJO - Solution
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".MainActivity"
android:background="@color/mirage"
android:padding="16dp">
public static void identifyUser(Context context, Activity activity, String email, String fullName, String nickName, String phone, String level){
MixpanelAPI mixpanel = MixpanelAPI.getInstance(context, MIXPANEL_TOKEN);
mixpanel.getPeople().identify(App.connectionId);
mixpanel.getPeople().set(ANALYTICS_EMAIL, email);
mixpanel.getPeople().set(ANALYTICS_FULLNAME_MIXPANEL, fullName);
mixpanel.getPeople().set(ANALYTICS_NICKNAME, nickName);
mixpanel.getPeople().set(ANALYTICS_PHONE, phone);
mixpanel.getPeople().set(ANALYTICS_LEVEL, level);
}
@Component(modules = [RepositoryModule::class])
interface LanchoneteComponent {
fun inject(app: MainActivity)
}
@guuilp
guuilp / booking.json
Created December 20, 2017 19:09
Booking Arena
{
"date":"2017-12-21",
"duration":60,
"billingDate":"5",
"phone":"+5519981737172",
"bookingType":1,
"acessCode":"7883",
"startTime":"18:00",
"objectID":"223bf110-20dc-e611-80c3-000d3a70cb8d"
}
{
"acessCode":"5878",
"bookingType":1,
"phone":"+5519981737172",
"date":"\/Date(1513216800000)\/",
"startTime":"18:30",
"billingDate":"5",
"duration":60,
"objectID":"c3d9ced4-f927-e611-80c3-00155dff1eba"
}
{
"nickname":"haha",
"attack":60,
"phone":"+551966666465",
"email":"hahaha@ha.ha",
"gender":"M",
"defense":40,
"position":"CDM",
"smsCode":"5678",
"fullName":"Hahahaha",
@guuilp
guuilp / gist:81f06c8a5581d2a9ce0a19dcf6c12ccc
Last active June 16, 2017 14:24
NestedScrollView not respecting childs size
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScrollView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:isScrollContainer="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:fillViewport="true"
@guuilp
guuilp / MainActivity.java
Created June 8, 2017 00:29
Change height animation on CardView
public class MainActivity extends AppCompatActivity {
private CardView cardView;
private Boolean isCollapsed = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"