Skip to content

Commit

Permalink
novas imagens.
Browse files Browse the repository at this point in the history
  • Loading branch information
marloncarvalho committed Jul 5, 2012
1 parent de7ab59 commit 14a1a24
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 46 deletions.
80 changes: 41 additions & 39 deletions equizmo/gen/br/gov/serpro/quiz/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ public static final class color {
public static final int color_textview_pontuacao=0x7f040001;
}
public static final class drawable {
public static final int background=0x7f020000;
public static final int botao_entrar=0x7f020001;
public static final int botao_jogar=0x7f020002;
public static final int box_pontuacao=0x7f020003;
public static final int box_ranking_geral=0x7f020004;
public static final int ic_launcher=0x7f020005;
public static final int ic_ranking=0x7f020006;
public static final int icon=0x7f020007;
public static final int imagem_face_lateral_esquerda=0x7f020008;
public static final int login_box=0x7f020009;
public static final int login_desenvolvido_por=0x7f02000a;
public static final int login_informe=0x7f02000b;
public static final int logo_inicial=0x7f02000c;
public static final int ampulheta=0x7f020000;
public static final int background=0x7f020001;
public static final int background_alerta=0x7f020002;
public static final int botao_entrar=0x7f020003;
public static final int botao_jogar=0x7f020004;
public static final int box_pontuacao=0x7f020005;
public static final int box_ranking_geral=0x7f020006;
public static final int ic_ranking=0x7f020007;
public static final int icon=0x7f020008;
public static final int imagem_face_lateral_esquerda=0x7f020009;
public static final int login_box=0x7f02000a;
public static final int login_desenvolvido_por=0x7f02000b;
public static final int login_informe=0x7f02000c;
public static final int logo_inicial=0x7f02000d;
}
public static final class id {
public static final int box_alerta=0x7f060012;
public static final int categorias_listview=0x7f060008;
public static final int categorias_textview_categoria=0x7f060007;
public static final int jogo_listview_proposicoes=0x7f060006;
Expand All @@ -42,12 +44,12 @@ public static final class id {
public static final int jogo_textview_pontuacao=0x7f060003;
public static final int layout_box_pontuacao=0x7f060001;
public static final int layout_box_titulo_ranking=0x7f06000f;
public static final int listview_item_categoria_nome=0x7f060012;
public static final int listview_item_proposicao_nome=0x7f060014;
public static final int listview_item_proposicao_ordem=0x7f060013;
public static final int listview_item_ranking_colocacao=0x7f060015;
public static final int listview_item_ranking_nome=0x7f060016;
public static final int listview_item_ranking_pontuacao=0x7f060017;
public static final int listview_item_categoria_nome=0x7f060013;
public static final int listview_item_proposicao_nome=0x7f060015;
public static final int listview_item_proposicao_ordem=0x7f060014;
public static final int listview_item_ranking_colocacao=0x7f060016;
public static final int listview_item_ranking_nome=0x7f060017;
public static final int listview_item_ranking_pontuacao=0x7f060018;
public static final int login_button_entrar=0x7f06000b;
public static final int login_edittext_email=0x7f06000a;
public static final int login_edittext_nome=0x7f060009;
Expand All @@ -63,27 +65,27 @@ public static final class layout {
public static final int activity_jogo_categorias=0x7f030001;
public static final int activity_login=0x7f030002;
public static final int activity_ranking=0x7f030003;
public static final int listview_item_categoria=0x7f030004;
public static final int listview_item_proposicao=0x7f030005;
public static final int listview_item_ranking=0x7f030006;
public static final int include_alerta=0x7f030004;
public static final int listview_item_categoria=0x7f030005;
public static final int listview_item_proposicao=0x7f030006;
public static final int listview_item_ranking=0x7f030007;
}
public static final class string {
public static final int app_name=0x7f050001;
public static final int categoria_button_jogar_text=0x7f050008;
public static final int categorias_selecione_categoria=0x7f05000e;
public static final int conexao_servico_falhou=0x7f05000b;
public static final int generic_message_title=0x7f050009;
public static final int generic_positive_button=0x7f05000a;
public static final int hello=0x7f050000;
public static final int login_button_entrar_text=0x7f050006;
public static final int login_edittext_email_hint=0x7f050005;
public static final int login_edittext_nome_hint=0x7f050003;
public static final int login_email_hint=0x7f050010;
public static final int login_nome_hint=0x7f05000f;
public static final int login_textview_email_text=0x7f050004;
public static final int login_textview_nome_text=0x7f050002;
public static final int ranking_atualizado=0x7f05000d;
public static final int ranking_button_jogar_text=0x7f050007;
public static final int ranking_pontuacao=0x7f05000c;
public static final int app_name=0x7f050000;
public static final int categoria_button_jogar_text=0x7f050007;
public static final int categorias_selecione_categoria=0x7f05000d;
public static final int conexao_servico_falhou=0x7f05000a;
public static final int generic_message_title=0x7f050008;
public static final int generic_positive_button=0x7f050009;
public static final int login_button_entrar_text=0x7f050005;
public static final int login_edittext_email_hint=0x7f050004;
public static final int login_edittext_nome_hint=0x7f050002;
public static final int login_email_hint=0x7f05000f;
public static final int login_nome_hint=0x7f05000e;
public static final int login_textview_email_text=0x7f050003;
public static final int login_textview_nome_text=0x7f050001;
public static final int ranking_atualizado=0x7f05000c;
public static final int ranking_button_jogar_text=0x7f050006;
public static final int ranking_pontuacao=0x7f05000b;
}
}
Binary file removed equizmo/res/drawable-ldpi/icon.png
Binary file not shown.
Binary file removed equizmo/res/drawable-mdpi/icon.png
Binary file not shown.
Binary file added equizmo/res/drawable-xhdpi/ampulheta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added equizmo/res/drawable-xhdpi/background_alerta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed equizmo/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file modified equizmo/res/drawable-xhdpi/icon.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions equizmo/res/layout/activity_jogo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
android:layout_marginTop="30dip"
android:src="@drawable/logo_inicial" />

<include layout="@layout/include_alerta" />

<RelativeLayout
android:id="@+id/layout_box_pontuacao"
android:layout_width="fill_parent"
Expand Down
2 changes: 2 additions & 0 deletions equizmo/res/layout/activity_jogo_categorias.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
android:layout_marginTop="30dip"
android:src="@drawable/logo_inicial" />

<include layout="@layout/include_alerta" />

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
Expand Down
4 changes: 3 additions & 1 deletion equizmo/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
android:layout_marginTop="30dip"
android:src="@drawable/logo_inicial" />

<include layout="@layout/include_alerta" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -35,7 +37,7 @@
android:layout_marginRight="20dip"
android:layout_marginTop="30dip"
android:hint="@string/login_nome_hint"
android:lines="1" />
android:inputType="textPersonName" />

<EditText
android:id="@+id/login_edittext_email"
Expand Down
19 changes: 19 additions & 0 deletions equizmo/res/layout/include_alerta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/box_alerta"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@drawable/background_alerta"
android:gravity="center_vertical"
android:visibility="gone" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="25dip"
android:src="@drawable/ampulheta" />

</RelativeLayout>
3 changes: 1 addition & 2 deletions equizmo/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="hello">Hello quiz!</string>
<string name="app_name">quiz</string>
<string name="app_name">eQUIZmó</string>
<string name="login_textview_nome_text">Nome:</string>
<string name="login_edittext_nome_hint">Informe seu nome.</string>
<string name="login_textview_email_text">E-mail:</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import br.gov.serpro.quiz.R;
import br.gov.serpro.quiz.model.Categoria;
Expand Down Expand Up @@ -48,6 +49,9 @@ public class JogoActivity extends RoboActivity {
@InjectView(R.id.jogo_textview_label_pontuacao)
private TextView textViewLabelPontuacao;

@InjectView(R.id.box_alerta)
private RelativeLayout boxAlerta;

private Jogo jogo = null;

@Override
Expand All @@ -61,6 +65,10 @@ public void onCreate(Bundle savedInstanceState) {

new AsyncTask<Void, Void, Void>() {

protected void onPreExecute() {
boxAlerta.setVisibility(View.VISIBLE);
}

@Override
protected Void doInBackground(Void... params) {
jogo.iniciar();
Expand All @@ -72,6 +80,7 @@ protected void onPostExecute(Void result) {
listViewProposicao.setAdapter(new ProposicaoAdapter(jogo.getQuestao().proposicoes));
textViewPergunta.setText(jogo.getQuestao().pergunta);
textViewCategoria.setText(categoria);
boxAlerta.setVisibility(View.GONE);
}

}.execute();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import br.gov.serpro.quiz.R;
import br.gov.serpro.quiz.model.Categoria;
Expand All @@ -36,6 +37,9 @@ public class JogoEscolhaCategoriasActivity extends RoboActivity {
@InjectView(R.id.categorias_listview)
private ListView listViewCategorias;

@InjectView(R.id.box_alerta)
private RelativeLayout boxAlerta;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -45,6 +49,10 @@ protected void onCreate(Bundle savedInstanceState) {

new AsyncTask<Void, Void, List<Categoria>>() {

protected void onPreExecute() {
boxAlerta.setVisibility(View.VISIBLE);
}

@Override
protected List<Categoria> doInBackground(Void... params) {
return Categoria.getCategoriasDisponiveis();
Expand All @@ -53,6 +61,7 @@ protected List<Categoria> doInBackground(Void... params) {
@Override
protected void onPostExecute(List<Categoria> result) {
listViewCategorias.setAdapter(new CategoriaAdapter(result));
boxAlerta.setVisibility(View.GONE);
}

}.execute();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import android.location.LocationManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import br.gov.serpro.quiz.R;
import br.gov.serpro.quiz.exception.ProblemaConexaoServicoException;
import br.gov.serpro.quiz.model.Usuario;
Expand All @@ -29,8 +29,6 @@
@ContentView(R.layout.activity_login)
public class LoginActivity extends RoboActivity {

private static String TAG = "quiz";

@InjectView(R.id.login_button_entrar)
private ImageButton buttonEntrar;

Expand All @@ -40,13 +38,15 @@ public class LoginActivity extends RoboActivity {
@InjectView(R.id.login_edittext_email)
private EditText editTextEmail;

@InjectView(R.id.box_alerta)
private RelativeLayout boxAlerta;

@Inject
private LocationManager locationManager;

@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i(TAG, "onCreate");
setListeners();
}

Expand All @@ -57,6 +57,10 @@ private void setListeners() {
buttonEntrar.setOnClickListener(new OnClickListener() {

public void onClick(final View v) {
boxAlerta.setVisibility(View.VISIBLE);
buttonEntrar.setClickable(false);
buttonEntrar.setEnabled(false);

Location localizacao = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

final Usuario usuario = new Usuario();
Expand Down Expand Up @@ -85,6 +89,11 @@ protected Boolean doInBackground(Void... params) {
}

protected void onPostExecute(Boolean result) {

buttonEntrar.setClickable(true);
buttonEntrar.setEnabled(true);
boxAlerta.setVisibility(View.GONE);

if (!result) {
Message.error(R.string.conexao_servico_falhou, LoginActivity.this);
} else {
Expand Down

0 comments on commit 14a1a24

Please sign in to comment.