Botones en la pantalla de inicio
5
.gitignore
vendored
@@ -35,4 +35,7 @@ google-services.json
|
|||||||
|
|
||||||
# Claude
|
# Claude
|
||||||
.claude/
|
.claude/
|
||||||
.settings/
|
.settings/
|
||||||
|
skills-lock.json
|
||||||
|
|
||||||
|
.agents
|
||||||
@@ -4,6 +4,8 @@ import android.graphics.Color;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
@@ -86,9 +88,9 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
private SoundManager soundManager;
|
private SoundManager soundManager;
|
||||||
private Handler handler = new Handler();
|
private Handler handler = new Handler();
|
||||||
|
|
||||||
private TextView tvSequence;
|
private TextView tvStratagemName;
|
||||||
private TextView tvCounter;
|
private TextView tvCounter;
|
||||||
private Button btnUp, btnDown, btnLeft, btnRight;
|
private ImageButton btnUp, btnDown, btnLeft, btnRight;
|
||||||
private Button btnVolver;
|
private Button btnVolver;
|
||||||
|
|
||||||
private int[] sequence;
|
private int[] sequence;
|
||||||
@@ -97,6 +99,7 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
private boolean esperando = false;
|
private boolean esperando = false;
|
||||||
private boolean juegoActivo = true;
|
private boolean juegoActivo = true;
|
||||||
private String[] ultimosArrows;
|
private String[] ultimosArrows;
|
||||||
|
private String ultimosArrowsStratagem;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -106,7 +109,7 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
try { soundManager = new SoundManager(this); }
|
try { soundManager = new SoundManager(this); }
|
||||||
catch (Exception e) { soundManager = null; }
|
catch (Exception e) { soundManager = null; }
|
||||||
|
|
||||||
tvSequence = findViewById(R.id.tv_sequence);
|
tvStratagemName = findViewById(R.id.tv_stratagem_name);
|
||||||
tvCounter = findViewById(R.id.tv_counter);
|
tvCounter = findViewById(R.id.tv_counter);
|
||||||
btnUp = findViewById(R.id.btn_up);
|
btnUp = findViewById(R.id.btn_up);
|
||||||
btnDown = findViewById(R.id.btn_down);
|
btnDown = findViewById(R.id.btn_down);
|
||||||
@@ -130,16 +133,11 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
playerIndex = 0;
|
playerIndex = 0;
|
||||||
juegoActivo = true;
|
juegoActivo = true;
|
||||||
ultimosArrows = new String[sequence.length];
|
ultimosArrows = new String[sequence.length];
|
||||||
|
ultimosArrowsStratagem = NAMES[idx];
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
if (tvStratagemName != null) {
|
||||||
for (int i = 0; i < sequence.length; i++) {
|
tvStratagemName.setText(ultimosArrowsStratagem);
|
||||||
int dir = sequence[i];
|
tvStratagemName.setTextColor(Color.parseColor("#FFD700"));
|
||||||
ultimosArrows[i] = ARROWS[dir];
|
|
||||||
sb.append(ultimosArrows[i]).append(" ");
|
|
||||||
}
|
|
||||||
if (tvSequence != null) {
|
|
||||||
tvSequence.setText(sb.toString().trim());
|
|
||||||
tvSequence.setTextColor(Color.parseColor("#FFD700"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handler.removeCallbacksAndMessages(null);
|
handler.removeCallbacksAndMessages(null);
|
||||||
@@ -159,7 +157,7 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
if (dir == sequence[playerIndex]) {
|
if (dir == sequence[playerIndex]) {
|
||||||
playerIndex++;
|
playerIndex++;
|
||||||
|
|
||||||
if (tvSequence != null) {
|
if (tvStratagemName != null) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < sequence.length; i++) {
|
for (int i = 0; i < sequence.length; i++) {
|
||||||
if (i < playerIndex) {
|
if (i < playerIndex) {
|
||||||
@@ -169,9 +167,9 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
tvSequence.setText(android.text.Html.fromHtml(sb.toString()));
|
tvStratagemName.setText(android.text.Html.fromHtml(sb.toString()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
tvSequence.setText(sb.toString().replaceAll("<[^>]*>", ""));
|
tvStratagemName.setText(sb.toString().replaceAll("<[^>]*>", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,9 +179,9 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
completadas++;
|
completadas++;
|
||||||
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
||||||
if (tvSequence != null) {
|
if (tvStratagemName != null) {
|
||||||
tvSequence.setText("OK!");
|
tvStratagemName.setText("OK!");
|
||||||
tvSequence.setTextColor(Color.parseColor("#00FF00"));
|
tvStratagemName.setTextColor(Color.parseColor("#00FF00"));
|
||||||
}
|
}
|
||||||
esperando = false;
|
esperando = false;
|
||||||
handler.postDelayed(this::nuevaRonda, 1200);
|
handler.postDelayed(this::nuevaRonda, 1200);
|
||||||
@@ -192,9 +190,9 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
if (soundManager != null) {
|
if (soundManager != null) {
|
||||||
try { soundManager.playFailure(); } catch (Exception e) {}
|
try { soundManager.playFailure(); } catch (Exception e) {}
|
||||||
}
|
}
|
||||||
if (tvSequence != null) {
|
if (tvStratagemName != null) {
|
||||||
tvSequence.setText("X");
|
tvStratagemName.setText("X");
|
||||||
tvSequence.setTextColor(Color.parseColor("#FF0000"));
|
tvStratagemName.setTextColor(Color.parseColor("#FF0000"));
|
||||||
}
|
}
|
||||||
juegoActivo = false;
|
juegoActivo = false;
|
||||||
handler.postDelayed(this::nuevaRonda, 1500);
|
handler.postDelayed(this::nuevaRonda, 1500);
|
||||||
|
|||||||
@@ -4,75 +4,80 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
/**
|
|
||||||
* Main Activity - Menu principal con tematica Helldivers 2
|
|
||||||
* Optimizado para Samsung Galaxy S3 (720x1280 xhdpi, landscape)
|
|
||||||
*/
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private SoundManager soundManager;
|
private SoundManager soundManager;
|
||||||
private Button btnQrInstagram;
|
private Button btnQrInstagram;
|
||||||
private Button btnMinijuego;
|
private Button btnMinijuego;
|
||||||
|
private ImageButton btnUp, btnDown, btnLeft, btnRight;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
// Inicializar SoundManager
|
try {
|
||||||
soundManager = new SoundManager(this);
|
soundManager = new SoundManager(this);
|
||||||
|
} catch (Exception e) {
|
||||||
// Referencias UI
|
soundManager = null;
|
||||||
btnQrInstagram = findViewById(R.id.btn_qr_instagram);
|
|
||||||
btnMinijuego = findViewById(R.id.btn_minijuego);
|
|
||||||
|
|
||||||
if (btnQrInstagram == null || btnMinijuego == null) {
|
|
||||||
throw new RuntimeException("Button not found in layout");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configurar listeners
|
btnQrInstagram = findViewById(R.id.btn_qr_instagram);
|
||||||
btnQrInstagram.setOnClickListener(new View.OnClickListener() {
|
btnMinijuego = findViewById(R.id.btn_minijuego);
|
||||||
@Override
|
btnUp = findViewById(R.id.btn_up);
|
||||||
public void onClick(View v) {
|
btnDown = findViewById(R.id.btn_down);
|
||||||
soundManager.playButtonClick();
|
btnLeft = findViewById(R.id.btn_left);
|
||||||
Intent intent = new Intent(MainActivity.this, ActivityQR.class);
|
btnRight = findViewById(R.id.btn_right);
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnMinijuego.setOnClickListener(new View.OnClickListener() {
|
if (btnQrInstagram != null) {
|
||||||
@Override
|
btnQrInstagram.setOnClickListener(v -> {
|
||||||
public void onClick(View v) {
|
if (soundManager != null) {
|
||||||
soundManager.playButtonClick();
|
try { soundManager.playButtonClick(); } catch (Exception e) {}
|
||||||
Intent intent = new Intent(MainActivity.this, ActivityGame.class);
|
}
|
||||||
startActivity(intent);
|
startActivity(new Intent(this, ActivityQR.class));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (btnMinijuego != null) {
|
||||||
|
btnMinijuego.setOnClickListener(v -> {
|
||||||
|
if (soundManager != null) {
|
||||||
|
try { soundManager.playButtonClick(); } catch (Exception e) {}
|
||||||
|
}
|
||||||
|
startActivity(new Intent(this, ActivityGame.class));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
View.OnClickListener arrowSoundListener = v -> {
|
||||||
|
if (soundManager != null) {
|
||||||
|
try { soundManager.playButtonClick(); } catch (Exception e) {}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (btnUp != null) btnUp.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnDown != null) btnDown.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnLeft != null) btnLeft.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnRight != null) btnRight.setOnClickListener(arrowSoundListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (soundManager != null) {
|
if (soundManager != null) soundManager.resume();
|
||||||
soundManager.resume();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
if (soundManager != null) {
|
if (soundManager != null) soundManager.pause();
|
||||||
soundManager.pause();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if (soundManager != null) {
|
if (soundManager != null) soundManager.release();
|
||||||
soundManager.release();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
app/src/main/res/drawable/class_1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/class_2.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/class_3.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/class_4.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
app/src/main/res/drawable/class_5.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/class_6.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/class_7.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/defensive_1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/defensive_10.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/defensive_11.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/defensive_2.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/defensive_3.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/defensive_4.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/defensive_5.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
app/src/main/res/drawable/defensive_6.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/defensive_7.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/defensive_8.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/defensive_9.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/hd_logo.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
app/src/main/res/drawable/offensive_1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_10.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_11.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_12.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_13.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_14.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_15.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_16.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_17.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_18.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_3.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_4.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_5.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_6.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/offensive_7.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/offensive_8.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/offensive_9.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/stepbakcward.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
app/src/main/res/drawable/stepforward.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
app/src/main/res/drawable/stratagemas_icon.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
app/src/main/res/drawable/supply_1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_10.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_11.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_12.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_13.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_14.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_15.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_16.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_17.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_18.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_19.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/supply_2.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_3.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/supply_4.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_5.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
app/src/main/res/drawable/supply_6.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_7.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/supply_8.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/supply_9.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/support_1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/support_10.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/support_2.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
app/src/main/res/drawable/support_3.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/support_4.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/support_5.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/support_6.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/support_7.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
app/src/main/res/drawable/support_8.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/support_9.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -17,40 +17,48 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#00FF00" />
|
android:textColor="#00FF00" />
|
||||||
|
|
||||||
<!-- Secuencia - arriba -->
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_counter_label"
|
android:id="@+id/tv_counter_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignTop="@id/tv_counter"
|
android:layout_alignTop="@id/tv_counter"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginEnd="26dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_toStartOf="@id/tv_counter"
|
android:layout_toStartOf="@id/tv_counter"
|
||||||
android:text="ESTRATAGEMAS: "
|
android:text="ESTRATAGEMAS: "
|
||||||
android:textColor="#00FF00"
|
android:textColor="#00FF00"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- Nombre de la estratagema -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_sequence"
|
android:id="@+id/tv_stratagem_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFD700" />
|
||||||
|
|
||||||
|
<!-- Secuencia displayed as images -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/sequence_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_above="@id/buttons_grid"
|
android:layout_above="@id/buttons_grid"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:text=""
|
android:orientation="horizontal"
|
||||||
android:textSize="36sp"
|
android:gravity="center" />
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#FFD700" />
|
|
||||||
|
|
||||||
<!-- Botones - mas separadas -->
|
<!-- Grid de Flechas - Centro -->
|
||||||
<GridLayout
|
<GridLayout
|
||||||
android:id="@+id/buttons_grid"
|
android:id="@+id/buttons_grid"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginBottom="48dp"
|
|
||||||
android:rowCount="3"
|
android:rowCount="3"
|
||||||
android:columnCount="3"
|
android:columnCount="3"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
@@ -61,16 +69,16 @@
|
|||||||
android:layout_row="0"
|
android:layout_row="0"
|
||||||
android:layout_column="0" />
|
android:layout_column="0" />
|
||||||
|
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/btn_up"
|
android:id="@+id/btn_up"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="0"
|
android:layout_row="0"
|
||||||
android:layout_column="1"
|
android:layout_column="1"
|
||||||
android:background="@drawable/btn_direction"
|
android:src="@drawable/stepforward"
|
||||||
android:text="↑"
|
android:scaleType="centerInside"
|
||||||
android:textColor="#FFD700"
|
android:background="@android:color/transparent"
|
||||||
android:textSize="36sp"
|
android:contentDescription="Up"
|
||||||
android:layout_margin="6dp" />
|
android:layout_margin="6dp" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
@@ -79,57 +87,60 @@
|
|||||||
android:layout_row="0"
|
android:layout_row="0"
|
||||||
android:layout_column="2" />
|
android:layout_column="2" />
|
||||||
|
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/btn_left"
|
android:id="@+id/btn_left"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="1"
|
android:layout_row="1"
|
||||||
android:layout_column="0"
|
android:layout_column="0"
|
||||||
android:background="@drawable/btn_direction"
|
android:src="@drawable/stepforward"
|
||||||
android:text="←"
|
android:scaleType="centerInside"
|
||||||
android:textColor="#FFD700"
|
android:rotation="-90"
|
||||||
android:textSize="36sp"
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Left"
|
||||||
android:layout_margin="6dp" />
|
android:layout_margin="6dp" />
|
||||||
|
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/btn_down"
|
android:id="@+id/btn_down"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="1"
|
android:layout_row="1"
|
||||||
android:layout_column="1"
|
android:layout_column="1"
|
||||||
android:background="@drawable/btn_direction"
|
android:src="@drawable/stepforward"
|
||||||
android:text="↓"
|
android:scaleType="centerInside"
|
||||||
android:textColor="#FFD700"
|
android:rotation="180"
|
||||||
android:textSize="36sp"
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Down"
|
||||||
android:layout_margin="6dp" />
|
android:layout_margin="6dp" />
|
||||||
|
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/btn_right"
|
android:id="@+id/btn_right"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="1"
|
android:layout_row="1"
|
||||||
android:layout_column="2"
|
android:layout_column="2"
|
||||||
android:background="@drawable/btn_direction"
|
android:src="@drawable/stepforward"
|
||||||
android:text="→"
|
android:scaleType="centerInside"
|
||||||
android:textColor="#FFD700"
|
android:rotation="90"
|
||||||
android:textSize="36sp"
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Right"
|
||||||
android:layout_margin="6dp" />
|
android:layout_margin="6dp" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="2"
|
android:layout_row="2"
|
||||||
android:layout_column="0" />
|
android:layout_column="0" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="2"
|
android:layout_row="2"
|
||||||
android:layout_column="1" />
|
android:layout_column="1" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="2"
|
android:layout_row="2"
|
||||||
android:layout_column="2" />
|
android:layout_column="2" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,87 +1,125 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:background="@drawable/bg_helldivers_gradient">
|
||||||
android:background="@drawable/bg_helldivers_gradient"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- Logo Helldivers 2 - Area superior -->
|
<!-- Logo Super Tierra - Arriba centro -->
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/logo_helldivers"
|
android:id="@+id/logo_super_tierra"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:src="@drawable/hd_logo"
|
||||||
android:text="HELLDIVERS"
|
android:contentDescription="Super Tierra"
|
||||||
android:textSize="36sp"
|
android:adjustViewBounds="true"
|
||||||
android:textStyle="bold"
|
android:maxWidth="300dp"
|
||||||
android:textColor="#FFD700"
|
android:tint="#FFD700" />
|
||||||
android:fontFamily="monospace"
|
|
||||||
android:shadowColor="#FF6B00"
|
|
||||||
android:shadowDx="2"
|
|
||||||
android:shadowDy="2"
|
|
||||||
android:shadowRadius="4" />
|
|
||||||
|
|
||||||
<!-- Contenedor principal de botones -->
|
<!-- Boton Estratagemas - Izquierda debajo del logo -->
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingHorizontal="48dp">
|
|
||||||
|
|
||||||
<!-- Boton QR Instagram -->
|
<!-- Boton QR Instagram - Derecha debajo del logo -->
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
<Button
|
||||||
android:id="@+id/btn_qr_instagram"
|
android:id="@+id/btn_minijuego"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
android:minHeight="72dp"
|
|
||||||
android:text="@string/btn_qr_instagram"
|
|
||||||
android:textColor="@color/helldivers_yellow"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:background="@drawable/btn_helldivers_primary"
|
|
||||||
android:drawableTop="@drawable/ic_qr_code"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
<!-- Boton Minijuego -->
|
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
|
||||||
android:id="@+id/btn_minijuego"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:minHeight="72dp"
|
|
||||||
android:text="@string/btn_minijuego"
|
|
||||||
android:textColor="@color/helldivers_yellow"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:background="@drawable/btn_helldivers_primary"
|
|
||||||
android:drawableTop="@drawable/ic_gamepad"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Footer con version -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_below="@id/logo_super_tierra"
|
||||||
android:text="@string/app_version"
|
android:layout_alignParentStart="true"
|
||||||
android:textColor="@color/helldivers_gray"
|
android:layout_marginStart="1dp"
|
||||||
android:textSize="12sp"
|
android:layout_marginTop="-46dp"
|
||||||
android:fontFamily="sans-serif-condensed" />
|
android:background="@drawable/btn_helldivers_primary"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="12dp"
|
||||||
|
android:text="ESTRATAGEMAS"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
<!-- Grid de Flechas - Centro -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_qr_instagram"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/logo_super_tierra"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="-43dp"
|
||||||
|
android:layout_marginEnd="2dp"
|
||||||
|
android:background="@drawable/btn_helldivers_primary"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="12dp"
|
||||||
|
android:text="@string/btn_qr_instagram"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:id="@+id/buttons_grid"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:rowCount="3"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="100dp" android:layout_row="0" android:layout_column="0" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_up"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Up"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/stepforward" />
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="100dp" android:layout_row="0" android:layout_column="2" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_left"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Left"
|
||||||
|
android:rotation="-90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/stepforward" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_down"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Down"
|
||||||
|
android:rotation="180"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/stepforward" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_right"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Right"
|
||||||
|
android:rotation="90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/stepforward" />
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="10dp" android:layout_row="2" android:layout_column="0" />
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="10dp" android:layout_row="2" android:layout_column="1" />
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="10dp" android:layout_row="2" android:layout_column="2" />
|
||||||
|
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
<!-- Footer version -->
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||