Corrções no login e registar
parent
72e39f447c
commit
ed43a1d02b
|
|
@ -4,6 +4,14 @@
|
|||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-11-26T09:17:18.598825Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/230421/.android/avd/Medium_Phone.avd" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -11,15 +11,22 @@
|
|||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.VdcScore">
|
||||
|
||||
<!-- Activity principal (Launcher) -->
|
||||
<activity
|
||||
android:name=".CriarContaActivity"
|
||||
android:exported="false">
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".LoginActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -57,10 +57,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
|||
return;
|
||||
}
|
||||
|
||||
// Por agora só mostra mensagem (podemos pôr Firebase ou SQLite depois)
|
||||
Toast.makeText(CriarContaActivity.this, "Conta criada com sucesso!", Toast.LENGTH_SHORT).show();
|
||||
|
||||
finish(); // volta para o login
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -69,6 +66,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(CriarContaActivity.this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
|
@ -16,6 +17,8 @@ public class LoginActivity extends AppCompatActivity {
|
|||
Button btnLogin;
|
||||
FirebaseAuth mAuth;
|
||||
|
||||
private TextView criarContaTextView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
@ -24,10 +27,17 @@ public class LoginActivity extends AppCompatActivity {
|
|||
editEmail = findViewById(R.id.editEmail);
|
||||
editPassword = findViewById(R.id.editPassword2);
|
||||
btnLogin = findViewById(R.id.btnLogin);
|
||||
criarContaTextView = findViewById(R.id.txtRegister);
|
||||
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
|
||||
btnLogin.setOnClickListener(v -> loginUser());
|
||||
criarContaTextView.setOnClickListener(view -> criarConta());
|
||||
}
|
||||
|
||||
private void criarConta() {
|
||||
Intent intent= new Intent(LoginActivity.this, CriarContaActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void loginUser() {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_margin="140dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_marginTop="140dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -83,7 +84,6 @@
|
|||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_margin="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardLogin" />
|
||||
|
||||
<TextView
|
||||
|
|
|
|||
Loading…
Reference in New Issue