Unverified Commit 9e69b4ae authored by Felix Förtsch's avatar Felix Förtsch
Browse files

add scannerId TextInput field, remove horrible font

parent cce3f970
......@@ -113,10 +113,7 @@ public class FakeManager extends Manager {
return UUID.fromString(userId);
}
public void doFakeCheckin(UUID userId) {
// TODO: Scanner ID aus QR-Code einlesen
UUID scannerId = UUID.fromString("1fe5f46d-2025-4d82-a10c-569f6fe0127e");
public void doFakeCheckin(UUID userId, UUID scannerId) {
DeviceData deviceData = new DeviceData(cryptoManager, userId, generateRandomData(16));
VenueData venueData = new VenueData(cryptoManager, checkInManager, scannerId, deviceData);
CheckinData checkinData = new CheckinData(deviceData, venueData);
......
......@@ -4,9 +4,11 @@ import android.content.Intent;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;
import com.google.android.material.textfield.TextInputEditText;
import de.culture4life.luca.R;
import de.culture4life.luca.fake.FakeManager;
import java.util.Objects;
import java.util.UUID;
import static de.culture4life.luca.registration.RegistrationManager.REGISTRATION_DATA_KEY;
......@@ -21,7 +23,6 @@ public class FakeCheckinActivity extends BaseActivity {
setContentView(R.layout.activity_fake_checkins);
SeekBar checkinCountSeekbar = findViewById(R.id.checkinCountSeekbar);
checkinCountSeekbar.setOnSeekBarChangeListener(seekBarListener);
findViewById(R.id.fakeCheckinButton).setOnClickListener(view -> {
......@@ -59,7 +60,9 @@ public class FakeCheckinActivity extends BaseActivity {
UUID userId = fakeManager.doFakeRegistration();
System.out.println("FakeManager: Do fake checkin");
fakeManager.doFakeCheckin(userId);
TextInputEditText textInputLayout = findViewById(R.id.scannerIdInput);
UUID scannerId = UUID.fromString(Objects.requireNonNull(textInputLayout.getText()).toString());
fakeManager.doFakeCheckin(userId, scannerId);
}
}
......
......@@ -17,6 +17,35 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ScannerID:"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.App.Body1"/>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/scannerIdInput"
android:fontFamily="sans-serif-condensed"
android:includeFontPadding="false"
android:text="1fe5f46d-2025-4d82-a10c-569f6fe0127e"
android:textAppearance="@style/TextAppearance.AppCompat.Display1"
android:singleLine="false"
android:typeface="normal"
android:textSize="34sp"/>
</com.google.android.material.textfield.TextInputLayout>
<Space
android:layout_width="match_parent"
android:layout_height="49dp"/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
......@@ -60,8 +89,8 @@
android:text="Fake in" />
<Space
android:layout_width="match_parent"
android:layout_height="162dp" />
android:layout_width="match_parent"
android:layout_height="72dp"/>
<Button
android:id="@+id/homeButton"
......
......@@ -35,7 +35,6 @@
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:statusBarColor">?android:attr/colorBackground</item>
<item name="fontFamily">@font/montserrat_regular</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment