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.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
public class SquareImageView extends ImageView { | |
public SquareImageView(Context context) { | |
super(context); | |
} | |
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 AppRater { | |
private static final String PREF_NAME = "AppRater"; | |
private static final String KEY_SHOW_APP_RATE = "show_app_rate"; | |
private static final String KEY_SHOW_LATER_COUNTER = "show_later_counter"; | |
private static final long SHOW_APP_RATE_INTERVAL = 1000 * 60 * 60 * 24 * 2; | |
public static void appLaunched(Context context) { |
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 abstract class Callback<T> implements retrofit2.Callback<T> { | |
private WeakReference<Activity> activityReference; | |
private ObservableField<Boolean> isDataLoading; | |
public Callback(Activity activity, ObservableField<Boolean> isDataLoading) { | |
this.activityReference = new WeakReference<>(activity); | |
this.isDataLoading = isDataLoading; | |
if (isDataLoading != null) { | |
isDataLoading.set(true); |
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
[ | |
{ | |
"QuestionId": "WhatDoYouLikeSending", | |
"SequenceType": "Question", | |
"Label": [ | |
{ | |
"en": "What do you like sending?" | |
}, | |
{ | |
"fr": "Qu'aimez-vous envoyer ?" |
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
[ | |
{ | |
"EventId": "MorningMessage", | |
"Action": "ShowAskHuggyMorningMessage", | |
"TriggersRule": "AllTriggersPassed", | |
"Triggers": [ | |
{ | |
"TriggerId": "TriggerByTimePeriod", | |
"TriggerType": "TimePeriod", | |
"TimeFrom": 8, |
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
[ | |
{ | |
"CommandId": "MessagesForSweetheart", | |
"Action": "MessagesByRecipient", | |
"TargetType": "9E2D23", | |
"TargetId": "SweetheartF", | |
"ImageName": "iStock_000008350300_Medium.jpg", | |
"Label": [ | |
{ | |
"en": "Messages my sweetheart" |
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
[ | |
{ | |
"QuestionId": "IsOftenLate", | |
"Label": [ | |
{ | |
"en": "Are you often late?" | |
}, | |
{ | |
"fr": "Es-tu souvent en retard?" | |
}, |
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
android { | |
dataBinding { | |
enabled = true | |
} | |
} |
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
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<data> | |
<!-- Variables and imports goes here --> | |
</data> | |
<!-- Your layout goes here --> | |
</layout> |
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
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<data /> | |
<TextView android:id=”@+id/tv_title” | |
android:layout_width=”wrap_content” | |
android:layout_height=”wrap_content”/> | |
</layout> |
OlderNewer