new screens

pull/5/head
Felix Prahl-Kamps 2018-06-05 17:57:56 +02:00
parent 40632cef5f
commit e4330f7100
16 changed files with 143 additions and 32 deletions

34
.idea/misc.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

BIN
Screenshots/scan-screen.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
Screenshots/share-screen.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -29,4 +29,6 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.kenglxn.QRGen:android:2.4.0'
implementation 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.9'
}

View File

@ -1,11 +1,22 @@
package de.overview.wg.its.misp_authentificator.activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import net.glxn.qrgen.android.QRCode;
import java.lang.reflect.Field;
import de.overview.wg.its.misp_authentificator.R;
public class SyncActivity extends AppCompatActivity {
@ -20,5 +31,18 @@ public class SyncActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
generateMyQR();
}
private void generateMyQR() {
ImageView qrImageView = findViewById(R.id.sync_my_qr);
Bitmap myBitmap = QRCode.from("This is my organisation information!")
.withColor(0xFF000000, 0x00000000)
.withSize(512,512)
.bitmap();
qrImageView.setImageBitmap(myBitmap);
}
}

View File

@ -0,0 +1,5 @@
<vector android:height="256dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="256dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M3,5v4h2L5,5h4L9,3L5,3c-1.1,0 -2,0.9 -2,2zM5,15L3,15v4c0,1.1 0.9,2 2,2h4v-2L5,19v-4zM19,19h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM19,3h-4v2h4v4h2L21,5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

View File

@ -27,46 +27,92 @@
android:background="@drawable/background_rounded_main"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:background="@color/colorPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.constraint.ConstraintLayout
android:padding="16dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@drawable/background_rounded_main"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Scan"
android:textAlignment="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Share"
android:textAlignment="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Upload"
android:textAlignment="center" />
</LinearLayout>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/button_generate_qr"
style="@style/CustomButton"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="Generate QR"
app:layout_constraintBottom_toTopOf="@+id/button_scan_qr"
tools:layout_editor_absoluteX="16dp" />
android:background="@color/colorPrimary"
android:indeterminate="false"
android:max="100"
android:paddingBottom="8dp"
android:paddingEnd="60dp"
android:paddingStart="60dp"
android:paddingTop="8dp"
android:progress="2"
android:progressTint="@color/colorAccent"
android:visibility="visible" />
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.AppCompatButton
android:id="@+id/button_scan_qr"
style="@style/CustomButton"
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_rounded_main"
android:padding="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:orientation="vertical">-->
<!--<FrameLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent">-->
<!--<ImageView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:adjustViewBounds="true"-->
<!--android:cropToPadding="true"-->
<!--android:scaleType="centerCrop"-->
<!--android:src="@drawable/test_image_low_res" />-->
<!--<ImageView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:src="@drawable/ic_qr_aim"-->
<!--android:tint="@color/colorPrimary" />-->
<!--</FrameLayout>-->
<ImageView
android:id="@+id/sync_my_qr"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="Scan QR"
app:layout_constraintBottom_toBottomOf="parent"
tools:layout_editor_absoluteX="3dp" />
android:layout_height="match_parent"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="center"/>
<!--</LinearLayout>-->
</android.support.constraint.ConstraintLayout>
</android.support.design.widget.CoordinatorLayout>

View File

@ -26,5 +26,4 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>

View File

@ -19,6 +19,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}