new screens
|
@ -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>
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 88 KiB |
|
@ -29,4 +29,6 @@ dependencies {
|
||||||
implementation 'com.android.support:design:27.1.1'
|
implementation 'com.android.support:design:27.1.1'
|
||||||
|
|
||||||
implementation 'com.android.volley:volley:1.1.0'
|
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'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,22 @@
|
||||||
package de.overview.wg.its.misp_authentificator.activity;
|
package de.overview.wg.its.misp_authentificator.activity;
|
||||||
|
|
||||||
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.View;
|
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;
|
import de.overview.wg.its.misp_authentificator.R;
|
||||||
|
|
||||||
public class SyncActivity extends AppCompatActivity {
|
public class SyncActivity extends AppCompatActivity {
|
||||||
|
@ -20,5 +31,18 @@ public class SyncActivity extends AppCompatActivity {
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setDisplayShowHomeEnabled(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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
After Width: | Height: | Size: 3.5 MiB |
After Width: | Height: | Size: 3.5 MiB |
After Width: | Height: | Size: 322 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 3.5 MiB |
|
@ -27,46 +27,92 @@
|
||||||
android:background="@drawable/background_rounded_main"
|
android:background="@drawable/background_rounded_main"
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
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
|
<TextView
|
||||||
android:padding="16dp"
|
android:layout_width="wrap_content"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/background_rounded_main"
|
android:layout_weight="1"
|
||||||
android:layout_width="match_parent"
|
android:text="Scan"
|
||||||
android:layout_height="match_parent">
|
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
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
style="?android:attr/progressBarStyle"
|
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||||
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"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:background="@color/colorPrimary"
|
||||||
android:text="Generate QR"
|
android:indeterminate="false"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/button_scan_qr"
|
android:max="100"
|
||||||
tools:layout_editor_absoluteX="16dp" />
|
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.support.constraint.ConstraintLayout
|
||||||
android:id="@+id/button_scan_qr"
|
android:layout_width="match_parent"
|
||||||
style="@style/CustomButton"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="8dp"
|
android:adjustViewBounds="false"
|
||||||
android:text="Scan QR"
|
android:cropToPadding="false"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:scaleType="center"/>
|
||||||
tools:layout_editor_absoluteX="3dp" />
|
|
||||||
|
|
||||||
|
<!--</LinearLayout>-->
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -26,5 +26,4 @@
|
||||||
|
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -19,6 +19,7 @@ allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|