Skip to content

Instantly share code, notes, and snippets.

View guuilp's full-sized avatar
😃
Hi!

Guilherme guuilp

😃
Hi!
View GitHub Profile
@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"
{
"nickname":"haha",
"attack":60,
"phone":"+551966666465",
"email":"hahaha@ha.ha",
"gender":"M",
"defense":40,
"position":"CDM",
"smsCode":"5678",
"fullName":"Hahahaha",
{
"acessCode":"5878",
"bookingType":1,
"phone":"+5519981737172",
"date":"\/Date(1513216800000)\/",
"startTime":"18:30",
"billingDate":"5",
"duration":60,
"objectID":"c3d9ced4-f927-e611-80c3-00155dff1eba"
}
@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"
}
@Component(modules = [RepositoryModule::class])
interface LanchoneteComponent {
fun inject(app: MainActivity)
}
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);
}
@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">
@guuilp
guuilp / comment.xml
Created June 28, 2018 02:08
Constraint Layout DOJO - Views without constraints (STEP 2)
<ImageView
android:id="@+id/comment"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginTop="12dp"
android:src="@drawable/ic_comment"
android:tint="@color/gray"/>
@guuilp
guuilp / profile_image.xml
Created June 28, 2018 02:08
Constraint Layout DOJO - Views without constraints (STEP 1)
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="8dp"
android:src="@drawable/profile_image"/>
@guuilp
guuilp / group_retweet.xml
Last active June 28, 2018 02:08
Constraint Layout DOJO - Views without constraints (STEP 3)
<android.support.constraint.Group
android:id="@+id/group_retweet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="retweet_top, retweet_user"/>