Dodaj próbną część kodu odpowiedzialną za komunikację z bazą danych online
This commit is contained in:
parent
6e7adc11a0
commit
bbaca66e3e
@ -33,4 +33,10 @@ dependencies {
|
||||
implementation project(path: ':openCVLibrary348')
|
||||
implementation 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
|
||||
implementation 'com.google.zxing:core:3.2.0'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'com.github.bumptech.glide:glide:3.7.0'
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
<uses-permission-sdk-23 android:name="android.permission.CAMERA" />
|
||||
<uses-permission-sdk-23 android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@ -12,7 +14,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".DecodeFail"></activity>
|
||||
<activity android:name=".PullDatabase"></activity>
|
||||
<activity android:name=".ConnectDatabase" />
|
||||
<activity android:name=".DecodeFail" />
|
||||
<activity android:name=".Decode" />
|
||||
<activity android:name=".TakePhoto" />
|
||||
<activity android:name=".Help" />
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.example.lookifyv2;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class ConnectDatabase extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_connect_database);
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.example.lookifyv2;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class PullDatabase extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_pull_database);
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="About"
|
||||
android:text="O aplikacji"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ConnectDatabase">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -10,7 +10,7 @@
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Please wait a second..."
|
||||
android:text="Proszę chwilę poczekać..."
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Whoops! Barcode could not be found!"
|
||||
android:text="Ups! Kodu kreskowego nie znaleziono!"
|
||||
app:layout_constraintBottom_toTopOf="@+id/try_again_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@ -23,7 +23,7 @@
|
||||
android:id="@+id/try_again_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Try again"
|
||||
android:text="Spróbuj ponownie"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@ -35,7 +35,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Return to menu"
|
||||
android:text="Powrót do menu"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Help"
|
||||
android:text="Pomoc"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:id="@+id/scan_start_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Scan"
|
||||
android:text="Skanowanie"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@ -22,7 +22,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Help"
|
||||
android:text="Pomoc"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@ -35,7 +35,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="About"
|
||||
android:text="O aplikacji"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
20
Lookify/app/src/main/res/layout/activity_pull_database.xml
Normal file
20
Lookify/app/src/main/res/layout/activity_pull_database.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:card_view="http://schemas.android.com/tools">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
card_view:cardUseCompatPadding="true"
|
||||
card_view:cardElevation="4dp"
|
||||
card_view:cardCornerRadius="4dp"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" />
|
||||
|
||||
</RelativeLayout>
|
59
Lookify/app/src/main/res/layout/card.xml
Normal file
59
Lookify/app/src/main/res/layout/card.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:elevation="4dp"
|
||||
card_view:cardUseCompatPadding="true"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="1dp"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moviename"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/image"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/cardview_dark_background"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="normal"
|
||||
android:typeface="sans" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/moviename"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/cardview_dark_background"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="normal"
|
||||
android:typeface="sans" />
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
13
Lookify/app/src/main/res/menu/menu_context.xml
Normal file
13
Lookify/app/src/main/res/menu/menu_context.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<item
|
||||
android:id="@+id/action_favourite"
|
||||
android:title="Add to Favorite" />
|
||||
<item
|
||||
android:id="@+id/action_watch"
|
||||
android:title="Watch Movie" />
|
||||
<item
|
||||
android:id="@+id/action_book"
|
||||
android:title="Book Ticket" />
|
||||
</menu>
|
@ -1,6 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
-->
|
||||
<color name="primary">#2196F3</color>
|
||||
<color name="primary_dark">#1976D2</color>
|
||||
<color name="primary_light">#BBDEFB</color>
|
||||
<color name="accent">#03A9F4</color>
|
||||
<color name="primary_text">#FFFFFF</color>
|
||||
<color name="secondary_text">#727272</color>
|
||||
<color name="icons">#FFFFFF</color>
|
||||
<color name="divider">#B6B6B6</color>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user