Corrções no login e registar
parent
72e39f447c
commit
ed43a1d02b
|
|
@ -4,6 +4,14 @@
|
||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<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>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,22 @@
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.VdcScore">
|
android:theme="@style/Theme.VdcScore">
|
||||||
|
|
||||||
|
<!-- Activity principal (Launcher) -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".CriarContaActivity"
|
android:name=".CriarContaActivity"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
|
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name=".LoginActivity"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
return;
|
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
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Intent intent = new Intent(CriarContaActivity.this, LoginActivity.class);
|
Intent intent = new Intent(CriarContaActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
@ -16,6 +17,8 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
Button btnLogin;
|
Button btnLogin;
|
||||||
FirebaseAuth mAuth;
|
FirebaseAuth mAuth;
|
||||||
|
|
||||||
|
private TextView criarContaTextView;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
@ -24,10 +27,17 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
editEmail = findViewById(R.id.editEmail);
|
editEmail = findViewById(R.id.editEmail);
|
||||||
editPassword = findViewById(R.id.editPassword2);
|
editPassword = findViewById(R.id.editPassword2);
|
||||||
btnLogin = findViewById(R.id.btnLogin);
|
btnLogin = findViewById(R.id.btnLogin);
|
||||||
|
criarContaTextView = findViewById(R.id.txtRegister);
|
||||||
|
|
||||||
mAuth = FirebaseAuth.getInstance();
|
mAuth = FirebaseAuth.getInstance();
|
||||||
|
|
||||||
btnLogin.setOnClickListener(v -> loginUser());
|
btnLogin.setOnClickListener(v -> loginUser());
|
||||||
|
criarContaTextView.setOnClickListener(view -> criarConta());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void criarConta() {
|
||||||
|
Intent intent= new Intent(LoginActivity.this, CriarContaActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loginUser() {
|
private void loginUser() {
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,9 @@
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_margin="140dp"
|
android:layout_marginTop="140dp"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -83,7 +84,6 @@
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_margin="10dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cardLogin" />
|
app:layout_constraintTop_toBottomOf="@+id/cardLogin" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue