Skip to content

Commit

Permalink
Merge pull request #19 from tink-expo/master_zealot
Browse files Browse the repository at this point in the history
Implement retake
  • Loading branch information
zealotzealot authored Dec 1, 2019
2 parents b1748ed + 9140270 commit f181149
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ public void onClick(View view) {
wifiConnectReceiver = WifiScanConnect.connectAndRegisterReceiver(FailActivity.this, wifiManager, new IntentFilter(), new SsidPw(currentId, currentPw), timer);
}
});

Button retakeButton = (Button) findViewById(R.id.retakeButton);
retakeButton.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(FailActivity.this, CameraActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
});
}


Expand Down
20 changes: 18 additions & 2 deletions android/app/src/main/res/layout/activity_fail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,31 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<Button
android:id="@+id/retakeButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="#f56c6c"
android:text="Retake the photo"
android:textAllCaps="false"
android:textColor="@color/colorWhite"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/retryButton"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />

<Button
android:id="@+id/retryButton"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:background="#e6e6e6"
android:text="Correct"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toEndOf="@id/retakeButton" />
</android.support.constraint.ConstraintLayout>

</android.support.constraint.ConstraintLayout>
Expand Down

0 comments on commit f181149

Please sign in to comment.