This file contains hidden or 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 ServiceRace extends IntentService { | |
private static final String TAG = "UserTravelResponse"; | |
private static final String TAXI_ACCEPTED = "taxi_accepted"; | |
private static final String USER_RESPONSE_FINISHED = "finished"; | |
private static final String USER_RESPONSE_CANCELED = "canceled"; | |
private static final String USER_RESPONSE_MESSAGE = "message"; | |
private final String[] route_status = {""}; | |
private final Boolean[] acceptReceipt = {false}; | |
private final Boolean[] cancelReceipt = {false}; |
This file contains hidden or 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.text.Editable; | |
import android.text.TextWatcher; | |
/** | |
* Text watcher for giving "#### #### #### ####" format to edit text. | |
* Created by epool on 3/14/16. | |
*/ | |
public class CreditCardFormattingTextWatcher implements TextWatcher { | |
private static final String EMPTY_STRING = ""; |
This file contains hidden or 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 Dude { | |
// Easy way ¬¬ april, 14 2018 | |
fun main(args: Array<String>) { | |
lambdaCall({ | |
System.out.println(it) | |
}) | |
} | |
This file contains hidden or 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
// Verifico se é a aba de produtos e, caso seja, troco o menu da toolbar | |
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { | |
@Override | |
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |
} | |
@Override | |
public void onPageSelected(int position) { | |
// Verifico se é a aba de produtos |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#F3F3F4" | |
android:orientation="vertical" > | |
<android.support.v4.view.ViewPager | |
android:id="@+id/pager" | |
android:layout_width="match_parent" |
This file contains hidden or 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
class Monster extends Enemy { | |
private String monsterName; | |
protected void monsterfy() { | |
this.monsterName = "Monster " + getRandomId(); // comando qualquer | |
} | |
} | |
class People extends Monster { | |
// quando a classe for criada, eu quero que o método monsterfy() execute como um "init()" |
This file contains hidden or 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 DialogBuilder { | |
/** | |
* Cria um diálogo com uma mensagem personalizada | |
* | |
* @param context | |
* @param message | |
*/ | |
public static void createGenericErrorDialog(Context context, String message) { | |
final Dialog errorDialog = new Dialog(context); |
This file contains hidden or 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
/** This method was called by Play! through the some tag in the html */ | |
public CompletableFuture<Result> submit() { | |
auth = FirebaseAuth.getInstance(app); | |
final Form<LoginForm> filledForm = loginForm.bindFromRequest(); | |
return signIn(filledForm); | |
} | |
private CompletableFuture<Result> signIn(Form<LoginForm> filledForm) { | |
final CompletableFuture<Result> resultFuture = new CompletableFuture(); |
This file contains hidden or 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
class Foo { | |
public static Finder<Long, Foo> find = new Finder<>(Foo.class); | |
Long id; | |
String name; | |
List<Doo> dooList; | |
/* Retorna uma lista de objetos Foo pelo type de Doo */ | |
public static List<Foo> getAllFoos(String type) { |
This file contains hidden or 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 SeuController extends Controller { | |
public Result login() { | |
System.out.println("Chamando meu método java"); | |
// Aqui vc faz algo... | |
// retorno pra view... | |
return ok(); | |
} |