View resume.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { "theme": "onepage" }, | |
"basics": { | |
"name": "Marcus Gabilheri", | |
"label": "Senior Android Software Engineer", | |
"picture": "", | |
"email": "marcusandreog@gmail.com", | |
"phone": "+1(405)385-1224", | |
"website": "", | |
"summary": "Hi, I'm Marcus and I have fun writing code.", |
View Framework.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.annotation.MainThread | |
import androidx.fragment.app.Fragment | |
import kotlin.reflect.KClass | |
interface ViewModelContractProvider { | |
fun <T : Any> provideViewModelContract(clazz: KClass<T>): T | |
val supportedContracts: Set<KClass<*>> | |
} | |
/** |
View Framework.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.annotation.MainThread | |
import androidx.fragment.app.Fragment | |
import kotlin.reflect.KClass | |
interface ViewModelContractProvider { | |
fun <T : Any> provideViewModelContract(clazz: KClass<T>): T | |
val supportedContracts: Set<KClass<*>> | |
} | |
/** |
View CardType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gabrielbauman.gist; | |
import java.util.regex.Pattern; | |
public enum CardType { | |
UNKNOWN, | |
VISA("^4[0-9]{12}(?:[0-9]{3}){0,2}$"), | |
MASTERCARD("^(?:5[1-5]|2(?!2([01]|20)|7(2[1-9]|3))[2-7])\\d{14}$"), | |
AMERICAN_EXPRESS("^3[47][0-9]{13}$"), |
View BaseRecyclerAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.IntRange; | |
import android.support.annotation.LayoutRes; | |
import android.support.annotation.NonNull; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.ArrayList; | |
import java.util.List; |
View HomeActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Somewhere inside your app... | |
if (isUserLoggedIn() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { | |
ShortcutManager shortcutManager = getSystemService(ShortcutManager.class); | |
// NOTE: You MUST specify an Action on the intents. Otherwise it will crash | |
Intent home = new Intent(this, HomeActivity.class); | |
home.setAction(Intent.ACTION_VIEW); | |
Intent profile = new Intent(this, UserProfileActivity.class); | |
profile.setAction(Intent.ACTION_VIEW); |
View AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.myapp"> | |
<application | |
android:name=".MyApp" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/Theme"> | |
<activity | |
android:name=".ui.home.HomeActivity"> | |
<intent-filter> |
View shortcuts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android"> | |
<shortcut | |
android:shortcutId="leaderboard" | |
android:enabled="true" | |
android:icon="@drawable/ic_leaderboard_primary" | |
<!-- --> | |
<!-- Note this needs to be a string resource, it can NOT be a string --> | |
<!-- If you try to use a literal string here will cause an error --> | |
android:shortcutShortLabel="@string/leaderboard" | |
android:shortcutLongLabel="@string/leaderboard"> |
View CustomMovieDetailsPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomMovieDetailsPresenter extends FullWidthDetailsOverviewRowPresenter { | |
private int mPreviousState = STATE_FULL; | |
public CustomMovieDetailsPresenter(Presenter detailsPresenter, DetailsOverviewLogoPresenter logoPresenter) { | |
super(detailsPresenter, logoPresenter); | |
// Setting the initial state to FULL prevents the OverviewRow from starting in a weird position | |
// It ensures consistency and avoids a bug that makes the poster start off the screen. | |
setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_FULL); |
View FullWidthDetailsOverviewRowPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onLayoutLogo(ViewHolder viewHolder, int oldState, boolean logoChanged) { | |
View v = viewHolder.getLogoViewHolder().view; | |
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) | |
v.getLayoutParams(); | |
switch (mAlignmentMode) { | |
case ALIGN_MODE_START: | |
default: | |
lp.setMarginStart(v.getResources().getDimensionPixelSize( | |
R.dimen.lb_details_v2_logo_margin_start)); | |
break; |
NewerOlder