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
Em uma activity ou fragment, verificar o life cycle para evitar executar código a cada acesso. | |
Por exemplo: | |
- Acessar uma lista de itens | |
- Acessar um dos itens da lista | |
- Voltar para lista | |
Dependendo do método executado (em relação a Activity e ao Fragment), a cada acesso a tela pode | |
ser atualizada ou também uma nova consulta ao webservice é executada. |
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
<EditText | |
android:layout_width="match_parent" | |
android:layout_height="180dp" | |
android:textColor="#000000" | |
android:hint="Text Hint Info..." | |
android:textColorHint="#CCCCCC" | |
android:textSize="20dp" | |
android:elegantTextHeight="true" | |
android:id="@+id/edDescription" | |
android:background="#FFF" |
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
Checar esses passos | |
http://stackoverflow.com/questions/25968542/please-check-the-confirmation-dialog-on-your-device |
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
<RelativeLayout | |
android:id="@+id/rlBlock" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="@drawable/bg_item" | |
android:layout_gravity="center_vertical" | |
android:paddingTop="10dp" | |
android:gravity="center_horizontal"> |
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
Se a lista de itens for exibida, mas os dados em cada item não vierem preenchidos, | |
verificar o contexto passada para o Adapter. |
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
Hex Opacity Values | |
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 |
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"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<gradient | |
android:angle="90" | |
android:startColor="#f00" | |
android:centerColor="@android:color/transparent" | |
android:centerX="0.01" /> | |
</shape> |
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
// Quando um método é chamado via Reflection em Java, as IDE's marcam o método como não utilizado. | |
// Para alterar essa verificação, adicione a seguinte annotation ao método: | |
@SuppressWarnings("unused") | |
public void timerMethod() { | |
} | |
// Funcionou no Android Studio. |
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
// Se um recyclerView não estiver sendo chamado | |
// (métodos do Adapter onCreateViewHolder e onBindViewHolder), | |
// mesmo passando uma lista de itens maior que zero, deve ser definida uma altura | |
// minima para a tag RecyclerView : | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/rvCardsList" | |
android:layout_width="match_parent" | |
android:layout_height="40dp" |
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
<!-- | |
Ver http://stackoverflow.com/questions/17989733/move-to-another-edittext-when-soft-keyboard-next-is-clicked-on-android | |
--> | |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<EditText | |
android:layout_width="fill_parent" |