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 'package:flutter/material.dart'; | |
import 'package:firebase_crashlytics/firebase_crashlytics.dart'; | |
class CrashTest extends StatefulWidget { | |
CrashTest({Key key}) : super(key: key); | |
_CrashTestState createState() => _CrashTestState(); | |
} | |
class _CrashTestState extends State<CrashTest> { | |
@override |
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
@BindingAdapter("app:touchFeedback") | |
public static void touchFeedback(View view, ColorDrawable color) { | |
Drawable colorDrawable; | |
ViewGroup parent = (ViewGroup) view.getParent(); | |
int index = parent.indexOfChild(view); | |
parent.removeView(view); | |
FrameLayout frameLayout = new FrameLayout(view.getContext()); | |
frameLayout.setLayoutParams(view.getLayoutParams()); |
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
final Animation fadeIn = new AlphaAnimation(0.0f, 1.0f); | |
fadeIn.setDuration(2000); | |
fadeIn.setStartOffset(500); | |
final Animation fadeOut = new AlphaAnimation(1.0f, 0.0f); | |
fadeOut.setDuration(2000); | |
fadeOut.setStartOffset(500); | |
fadeIn.setAnimationListener(new Animation.AnimationListener(){ |
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
private TextView mTvCreate, mTvRestart, mTvStart, mTvResume; | |
... | |
mTvCreate = (TextView) findViewById(R.id.create); | |
mTvRestart = (TextView) findViewById(R.id.restart); | |
mTvStart = (TextView) findViewById(R.id.start); | |
mTvResume = (TextView) findViewById(R.id.resume); |
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
@InjectView(R.id.textView2) TextView textView2; | |
@InjectView(R.id.textView3) TextView textView3; | |
@InjectView(R.id.textView4) TextView textView4; | |
@InjectView(R.id.textView5) TextView textView5; | |
@InjectView(R.id.textView6) TextView textView6; | |
@InjectView(R.id.button) Button button; | |
@InjectView(R.id.button2) Button button2; | |
@Override |
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
private TextView textView2; | |
private TextView textView3; | |
private TextView textView4; | |
private TextView textView5; | |
private TextView textView6; | |
private Button button; | |
private Button button2; | |
@Override |
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.TextUtils; | |
public String getPhones(ArrayList<Phone> phones) { | |
ArrayList<String> formattedPhones = new ArrayList<String>(); | |
for (Phone phone: phones) { | |
formattedPhones.add(phone.getNumber()); | |
} | |
return TextUtils.join(" / ", formattedPhones); | |
} |
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
String busca; | |
busca = Utils.getInstance().normalizerToUnaccent(busca); | |
anuncios = (ArrayList<Anuncio>) Anuncio | |
.find(Anuncio.class, | |
"nome_normalized LIKE ? OR endereco_normalized LIKE ? OR email LIKE ? OR telefones LIKE ? OR site LIKE ? OR descricao_normalized LIKE ? OR cidade_normalized LIKE ?", | |
new String[] {"%" + busca + "%", "%" + busca + "%", "%" + busca + "%", "%" + busca + "%", "%" + busca + "%", "%" + busca + "%", "%" + busca + "%"}); |
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 String normalizerToUnaccent(String s) { | |
String normalized = Normalizer.normalize(s, Normalizer.Form.NFD); | |
return normalized.replaceAll("[^\\p{ASCII}]", ""); | |
} |
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 Anuncio extends SugarRecord { | |
private String nome; | |
private String nomeNormalized; | |
private String endereco; | |
private String enderecoNormalized; | |
private String descricao; | |
private String descricaoNormalized; | |
private String cidade; | |
private String cidadeNormalized; | |