Skip to content

Instantly share code, notes, and snippets.

View graffiti75's full-sized avatar
🏠
Working from home

Rodrigo Cericatto graffiti75

🏠
Working from home
View GitHub Profile
/**
* Código para acompanhar placar de um jogo de Futebol Americano.
*/
public class MainActivity extends AppCompatActivity {
// Placar Time A
private int scoreTeamA;
// Placar Time B
private int scoreTeamB;
@graffiti75
graffiti75 / Setting Retrofit.md
Last active December 13, 2019 14:35
How to set Retrofit in Android

Into app.gradle, add Retrofit gradle dependencies

ext {
  retrofitVersion="2.7.0"
  loggingInterceptorVersion="4.2.1"
  gsonVersion="2.7.0"
}

implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/Theme.Bacon.List.CardView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.example.xyzreader.ui.DynamicHeightNetworkImageView
android:layout_height="match_parent"
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:clickable="true"
android:focusable="true"
android:foreground="?selectableItemBackground">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:background="?colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?selectableItemBackground">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/card_inside_margin"
android:layout_marginTop="@dimen/card_inside_margin"
android:layout_marginRight="@dimen/card_inside_margin"
android:layout_marginBottom="@dimen/card_inside_margin"
android:clickable="true"
android:focusable="true"
android:foreground="?selectableItemBackground">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:clickable="true"
android:focusable="true"
android:foreground="?selectableItemBackground">
<android.support.v7.widget.CardView 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="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:clickable="true"
android:elevation="@dimen/fourdp"
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:clickable="true"
android:focusable="true"
android:foreground="?selectableItemBackground">
<android.support.v7.widget.CardView 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="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
android:clickable="true"
android:focusable="true"