├── .idea
├── .name
├── vcs.xml
├── misc.xml
├── runConfigurations.xml
├── gradle.xml
└── codeStyles
│ └── Project.xml
├── app
├── .gitignore
├── release
│ ├── app-release.apk
│ └── output.json
├── src
│ ├── main
│ │ ├── ic_launcher-web.png
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── back_sign.png
│ │ │ │ ├── view_profile.xml
│ │ │ │ ├── view_codesback.xml
│ │ │ │ ├── bottom_selector.xml
│ │ │ │ ├── back_grey.xml
│ │ │ │ ├── download_back.xml
│ │ │ │ ├── shapeofedittext.xml
│ │ │ │ ├── shapeofstartbttn.xml
│ │ │ │ ├── view_comment.xml
│ │ │ │ ├── ic_arrow_back_black_24dp.xml
│ │ │ │ ├── ic_computer_black_24dp.xml
│ │ │ │ ├── ic_favorite_black_24dp.xml
│ │ │ │ ├── ic_exit_to_app_black_24dp.xml
│ │ │ │ ├── ic_action_search.xml
│ │ │ │ ├── ic_search_black_24dp.xml
│ │ │ │ ├── ic_user_icon.xml
│ │ │ │ ├── ic_comment_forbookapp.xml
│ │ │ │ ├── toolbar_border_bottom.xml
│ │ │ │ ├── ic_share_black_24dp.xml
│ │ │ │ ├── ic_home_modernicon.xml
│ │ │ │ ├── ic_pdf.xml
│ │ │ │ ├── ic_app_logo.xml
│ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ └── ic_github_forbook.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ ├── ic_launcher_background.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ ├── ic_launcher_background.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ ├── ic_launcher_background.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ ├── ic_launcher_background.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ ├── ic_launcher_background.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── values
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── preloaded_fonts.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── font_certs.xml
│ │ │ ├── anim
│ │ │ │ ├── slide_out_left.xml
│ │ │ │ ├── slide_in_left.xml
│ │ │ │ ├── slide_in_right.xml
│ │ │ │ └── slide_out_right.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── font
│ │ │ │ ├── gudea.xml
│ │ │ │ ├── muli.xml
│ │ │ │ ├── montserrat.xml
│ │ │ │ └── montserrat_bold.xml
│ │ │ ├── menu
│ │ │ │ ├── menu.xml
│ │ │ │ └── bottom_navigation_item.xml
│ │ │ └── layout
│ │ │ │ ├── activity_pdf.xml
│ │ │ │ ├── item_signslider.xml
│ │ │ │ ├── item_bookslider.xml
│ │ │ │ ├── item_book.xml
│ │ │ │ ├── item_bookseach.xml
│ │ │ │ ├── activity_search.xml
│ │ │ │ ├── activity_bottom_navi.xml
│ │ │ │ ├── activity_book_profile2.xml
│ │ │ │ ├── activity_sign_up.xml
│ │ │ │ ├── toolbarforprofilebook.xml
│ │ │ │ ├── activity_google_user_profile.xml
│ │ │ │ ├── item_review.xml
│ │ │ │ ├── activity_comment_activity.xml
│ │ │ │ ├── fragment_computer.xml
│ │ │ │ ├── profile_layout.xml
│ │ │ │ └── activity_main.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── deveu
│ │ │ │ └── copus
│ │ │ │ └── app
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── Notifications
│ │ │ │ ├── MyFirebaseIdService.java
│ │ │ │ ├── OreoNotification.java
│ │ │ │ └── MyFirebaseMessagingService.java
│ │ │ │ ├── Datas
│ │ │ │ ├── slide.java
│ │ │ │ ├── MyBooks.java
│ │ │ │ ├── Users.java
│ │ │ │ ├── Reviews.java
│ │ │ │ └── Books.java
│ │ │ │ ├── ReadingSection
│ │ │ │ ├── PDFActivity.java
│ │ │ │ ├── Comment_activity.java
│ │ │ │ ├── BookProfile2.java
│ │ │ │ └── SearchActivity.java
│ │ │ │ ├── Adapter
│ │ │ │ ├── SignSliderAdapter.java
│ │ │ │ ├── BookSliderAdapter.java
│ │ │ │ ├── BottomNavigationViewBehavior.java
│ │ │ │ ├── ViewHolderMyBooks.java
│ │ │ │ ├── ViewHolderBooks.java
│ │ │ │ ├── ViewHolderBookSearch.java
│ │ │ │ └── ReviewAdapter.java
│ │ │ │ ├── BottomNavi
│ │ │ │ ├── ComputerFragment.java
│ │ │ │ └── bottomNavi.java
│ │ │ │ └── Sign_in
│ │ │ │ └── GoogleUserProfile.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── deveu
│ │ │ └── copus
│ │ │ └── app
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── deveu
│ │ └── copus
│ │ └── app
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
├── google-services.json
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── README.md
├── gradlew.bat
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | DevEuCopusApp
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='DevEuCopusApp'
3 |
--------------------------------------------------------------------------------
/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/release/app-release.apk
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/back_sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/drawable/back_sign.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Eronred/Programming-Books-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFEFC
4 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Codeopus-Programming Books
3 |
4 |
5 | Hello blank fragment
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/view_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/release/output.json:
--------------------------------------------------------------------------------
1 | [{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":8,"versionName":"1.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
--------------------------------------------------------------------------------
/app/src/main/res/drawable/view_codesback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bottom_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jun 20 17:44:47 EET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/back_grey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/download_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shapeofedittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #000202
5 | #D81B60
6 | #FFFFFF
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shapeofstartbttn.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/view_comment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @font/montserrat
5 | - @font/montserrat_bold
6 | - @font/muli
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/font/gudea.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/muli.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_bold.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_computer_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/test/java/com/deveu/copus/app/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_favorite_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_exit_to_app_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 | import androidx.recyclerview.widget.RecyclerView;
5 |
6 | import android.os.Bundle;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | RecyclerView recyclerView_new;
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 |
17 |
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_action_search.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_pdf.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Notifications/MyFirebaseIdService.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Notifications;
2 |
3 |
4 | import android.util.Log;
5 |
6 | import com.google.firebase.iid.FirebaseInstanceId;
7 | import com.google.firebase.iid.FirebaseInstanceIdService;
8 |
9 | public class MyFirebaseIdService extends FirebaseInstanceIdService {
10 | private static final String REG_TOKEN="REG_TOKEN";
11 | @Override
12 | public void onTokenRefresh() {
13 | String recent_token = FirebaseInstanceId.getInstance().getToken();
14 | Log.d(REG_TOKEN, recent_token);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Datas/slide.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Datas;
2 |
3 | public class slide {
4 | private String Image;
5 | private String Title;
6 |
7 | public slide(String image, String title) {
8 | Image = image;
9 | Title = title;
10 | }
11 |
12 | public String getImage() {
13 | return Image;
14 | }
15 |
16 | public void setImage(String image) {
17 | Image = image;
18 | }
19 |
20 | public String getTitle() {
21 | return Title;
22 | }
23 | public void setTitle(String title) {
24 | Title = title;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_user_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/bottom_navigation_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_comment_forbookapp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/toolbar_border_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | -
11 |
12 |
14 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 | -keep class androidx.appcombat.widget.** { *;}
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/deveu/copus/app/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.deveu.copus.app", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_home_modernicon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Datas/MyBooks.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Datas;
2 |
3 | public class MyBooks {
4 | private String bookid;
5 | private String bookname;
6 | private String bookphoto;
7 | private String pdflink;
8 |
9 |
10 | public MyBooks() {
11 | }
12 |
13 | public MyBooks(String bookid, String bookname, String bookphoto,String pdflink) {
14 | this.bookid = bookid;
15 | this.bookname = bookname;
16 | this.bookphoto = bookphoto;
17 | this.pdflink = pdflink;
18 | }
19 |
20 |
21 | public String getPdflink() {
22 | return pdflink;
23 | }
24 |
25 | public void setPdflink(String pdflink) {
26 | this.pdflink = pdflink;
27 | }
28 |
29 | public String getBookid() {
30 | return bookid;
31 | }
32 |
33 | public void setBookid(String bookid) {
34 | this.bookid = bookid;
35 | }
36 |
37 | public String getBookname() {
38 | return bookname;
39 | }
40 |
41 | public void setBookname(String bookname) {
42 | this.bookname = bookname;
43 | }
44 |
45 | public String getBookphoto() {
46 | return bookphoto;
47 | }
48 |
49 | public void setBookphoto(String bookphoto) {
50 | this.bookphoto = bookphoto;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_signslider.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Datas/Users.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Datas;
2 |
3 | public class Users {
4 |
5 | private String isPro;
6 | private String userid;
7 | private String userimage;
8 | private String userinfo;
9 | private String username;
10 |
11 | public Users() {
12 | }
13 |
14 | public Users(String isPro, String userid, String userimage, String userinfo, String username) {
15 | this.isPro = isPro;
16 | this.userid = userid;
17 | this.userimage = userimage;
18 | this.userinfo = userinfo;
19 | this.username = username;
20 | }
21 |
22 | public String getIsPro() {
23 | return isPro;
24 | }
25 |
26 | public void setIsPro(String isPro) {
27 | this.isPro = isPro;
28 | }
29 |
30 | public String getUserid() {
31 | return userid;
32 | }
33 |
34 | public void setUserid(String userid) {
35 | this.userid = userid;
36 | }
37 |
38 | public String getUserimage() {
39 | return userimage;
40 | }
41 |
42 | public void setUserimage(String userimage) {
43 | this.userimage = userimage;
44 | }
45 |
46 | public String getUserinfo() {
47 | return userinfo;
48 | }
49 |
50 | public void setUserinfo(String userinfo) {
51 | this.userinfo = userinfo;
52 | }
53 |
54 | public String getUsername() {
55 | return username;
56 | }
57 |
58 | public void setUsername(String username) {
59 | this.username = username;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_bookslider.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
21 |
22 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Datas/Reviews.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Datas;
2 |
3 | public class Reviews {
4 | private String usid;
5 | private String bookid;
6 | private String rating;
7 | private String reviewid;
8 | private String review;
9 | private String date;
10 |
11 | public Reviews() {
12 | }
13 |
14 | public Reviews(String usid, String bookid, String rating, String reviewid, String review, String date) {
15 | this.usid = usid;
16 | this.bookid = bookid;
17 | this.rating = rating;
18 | this.reviewid = reviewid;
19 | this.review = review;
20 | this.date = date;
21 | }
22 |
23 | public String getUsid() {
24 | return usid;
25 | }
26 |
27 | public void setUsid(String usid) {
28 | this.usid = usid;
29 | }
30 |
31 | public String getBookid() {
32 | return bookid;
33 | }
34 |
35 | public void setBookid(String bookid) {
36 | this.bookid = bookid;
37 | }
38 |
39 | public String getRating() {
40 | return rating;
41 | }
42 |
43 | public void setRating(String rating) {
44 | this.rating = rating;
45 | }
46 |
47 | public String getReviewid() {
48 | return reviewid;
49 | }
50 |
51 | public void setReviewid(String reviewid) {
52 | this.reviewid = reviewid;
53 | }
54 |
55 | public String getReview() {
56 | return review;
57 | }
58 |
59 | public void setReview(String review) {
60 | this.review = review;
61 | }
62 |
63 | public String getDate() {
64 | return date;
65 | }
66 |
67 | public void setDate(String date) {
68 | this.date = date;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/ReadingSection/PDFActivity.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.ReadingSection;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.annotation.SuppressLint;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 |
9 | import android.webkit.WebView;
10 | import android.webkit.WebViewClient;
11 | import android.widget.Toast;
12 |
13 |
14 | import com.deveu.copus.app.R;
15 |
16 | import java.io.UnsupportedEncodingException;
17 |
18 | import java.net.URLEncoder;
19 |
20 | public class PDFActivity extends AppCompatActivity {
21 | private WebView web_view;
22 | //private PDFView pdfView;
23 | @SuppressLint("SetJavaScriptEnabled")
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_pdf);
28 |
29 | web_view = findViewById(R.id.webUrl);
30 | //pdfView = findViewById(R.id.pdfView);
31 | // new RetrievePDFStream().execute(url);
32 | web_view.getSettings().setJavaScriptEnabled(true);
33 | web_view.getSettings().setBuiltInZoomControls(true);
34 | web_view.setWebViewClient(new WebViewClient() {
35 | });
36 | Intent intent = getIntent();
37 | String url = intent.getStringExtra("link");
38 | try {
39 | url= URLEncoder.encode(url,"UTF-8");
40 | } catch (UnsupportedEncodingException e) {
41 | e.printStackTrace();
42 | }
43 | String finalURL = "http://drive.google.com/viewerng/viewer?embedded=true&url="+url;
44 | web_view.loadUrl(finalURL);
45 |
46 | Toast.makeText(PDFActivity.this, "The book is loading to preview...", Toast.LENGTH_SHORT).show();
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "944223972121",
4 | "firebase_url": "https://coder-books.firebaseio.com",
5 | "project_id": "coder-books",
6 | "storage_bucket": "coder-books.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:944223972121:android:ee1d6876fea3f44c1df388",
12 | "android_client_info": {
13 | "package_name": "com.deveu.copus.app"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "944223972121-96jrufie3c7392n3aujp168rmvqvhdmf.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.deveu.copus.app",
22 | "certificate_hash": "52d5ce96f9166504bccc275c10f4f6369854d2c9"
23 | }
24 | },
25 | {
26 | "client_id": "944223972121-ho5i2ujl5r9l4qnfdv9os2dstpmr1n9s.apps.googleusercontent.com",
27 | "client_type": 1,
28 | "android_info": {
29 | "package_name": "com.deveu.copus.app",
30 | "certificate_hash": "20650997ea109933971388244901247a7e30f73a"
31 | }
32 | },
33 | {
34 | "client_id": "944223972121-s7p54akito8gigumqccss4r2dkfiatdr.apps.googleusercontent.com",
35 | "client_type": 3
36 | }
37 | ],
38 | "api_key": [
39 | {
40 | "current_key": "AIzaSyAudFmo2V0p3Eb2t20Voqb4J_kYUEHmoOw"
41 | }
42 | ],
43 | "services": {
44 | "appinvite_service": {
45 | "other_platform_oauth_client": [
46 | {
47 | "client_id": "944223972121-s7p54akito8gigumqccss4r2dkfiatdr.apps.googleusercontent.com",
48 | "client_type": 3
49 | }
50 | ]
51 | }
52 | }
53 | }
54 | ],
55 | "configuration_version": "1"
56 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/SignSliderAdapter.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.viewpager.widget.PagerAdapter;
12 |
13 | import com.deveu.copus.app.Datas.slide;
14 | import com.deveu.copus.app.R;
15 | import com.squareup.picasso.Picasso;
16 |
17 | import java.util.List;
18 |
19 | public class SignSliderAdapter extends PagerAdapter {
20 |
21 |
22 | private Context mcontext;
23 | private List mList;
24 |
25 |
26 | public SignSliderAdapter(Context mcontext, List mList) {
27 | this.mcontext = mcontext;
28 | this.mList = mList;
29 | }
30 |
31 | @Override
32 | public int getCount() {
33 | return mList.size();
34 | }
35 |
36 |
37 | @NonNull
38 | @Override
39 | public Object instantiateItem(@NonNull ViewGroup container, int position) {
40 | LayoutInflater inflater=(LayoutInflater) mcontext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
41 | View slideLayout= inflater.inflate(R.layout.item_signslider,null);
42 | ImageView slideImg=slideLayout.findViewById(R.id.book_picofslider);
43 | TextView slideText=slideLayout.findViewById(R.id.slide_tittletest);
44 |
45 |
46 | Picasso.get().load(mList.get(position).getImage()).into(slideImg);
47 | slideText.setText(mList.get(position).getTitle());
48 |
49 |
50 | container.addView(slideLayout);
51 | return slideLayout;
52 |
53 | }
54 |
55 | @Override
56 | public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
57 | return view==o;
58 | }
59 |
60 | @Override
61 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
62 | container.removeView((View)object);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/BookSliderAdapter.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.viewpager.widget.PagerAdapter;
12 |
13 |
14 | import com.deveu.copus.app.Datas.slide;
15 | import com.deveu.copus.app.R;
16 | import com.squareup.picasso.Picasso;
17 |
18 | import java.util.List;
19 |
20 | public class BookSliderAdapter extends PagerAdapter {
21 |
22 |
23 | private Context mcontext;
24 | private List mList;
25 |
26 |
27 | public BookSliderAdapter(Context mcontext, List mList) {
28 | this.mcontext = mcontext;
29 | this.mList = mList;
30 | }
31 |
32 | @Override
33 | public int getCount() {
34 | return mList.size();
35 | }
36 |
37 |
38 | @NonNull
39 | @Override
40 | public Object instantiateItem(@NonNull ViewGroup container, int position) {
41 | LayoutInflater inflater=(LayoutInflater) mcontext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
42 | View slideLayout= inflater.inflate(R.layout.item_bookslider,null);
43 | ImageView slideImg=slideLayout.findViewById(R.id.book_picofslider);
44 | TextView slideText=slideLayout.findViewById(R.id.slide_tittletest);
45 |
46 |
47 | Picasso.get().load(mList.get(position).getImage()).into(slideImg);
48 | slideText.setText(mList.get(position).getTitle());
49 |
50 |
51 | container.addView(slideLayout);
52 | return slideLayout;
53 |
54 | }
55 |
56 | @Override
57 | public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
58 | return view==o;
59 | }
60 |
61 | @Override
62 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
63 | container.removeView((View)object);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | # Programming Books App [](https://play.google.com/store/apps/details?id=com.deveu.copus.app)
20 |
21 | This open-source was made to show how you can create this kind app and to teach Firebase functionality as backend. Please do not share your own App in the store!
22 | You can reach the app from here: [](https://play.google.com/store/apps/details?id=com.deveu.copus.app)
23 |
24 | 
25 |
26 |
27 | ### How to Share
28 | + [Share on Twitter](http://twitter.com/intent/tweet?text=https://github.com/Eronred/Programming-Books-App)
29 | + [Share on Facebook](http://www.facebook.com/sharer/sharer.php?s=100&p[url]=https://github.com/Eronred/Programming-Books-App[summary]=)
30 | + [Share on Google Plus](https://plus.google.com/share?url=https://github.com/Eronred/Programming-Books-App)
31 | + [Share on LinkedIn](http://www.linkedin.com/shareArticle?mini=true&url=https://github.com/Eronred/Programming-Books-App)
32 | + [Share on Telegram](https://t.me/share/url?url=https://github.com/Eronred/Programming-Books-App)
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/BottomNavigationViewBehavior.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.view.View;
4 |
5 | import androidx.annotation.NonNull;
6 | import androidx.coordinatorlayout.widget.CoordinatorLayout;
7 | import androidx.core.view.ViewCompat;
8 |
9 | import com.google.android.material.bottomnavigation.BottomNavigationView;
10 |
11 | public class BottomNavigationViewBehavior extends CoordinatorLayout.Behavior{
12 | private int height=300;
13 |
14 | @Override
15 | public boolean onLayoutChild(CoordinatorLayout parent, BottomNavigationView child, int layoutDirection) {
16 | height = child.getHeight();
17 |
18 |
19 |
20 | return super.onLayoutChild(parent, child, layoutDirection);
21 | }
22 |
23 | @Override
24 | public boolean onStartNestedScroll(@NonNull CoordinatorLayout coordinatorLayout,
25 | BottomNavigationView child, @NonNull
26 | View directTargetChild, @NonNull View target,
27 | int axes, int type)
28 | {
29 | return axes == ViewCompat.SCROLL_AXIS_VERTICAL;
30 | }
31 |
32 | @Override
33 | public void onNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull BottomNavigationView child,
34 | @NonNull View target, int dxConsumed, int dyConsumed,
35 | int dxUnconsumed, int dyUnconsumed,
36 | @ViewCompat.NestedScrollType int type)
37 | {
38 | if (dyConsumed > 0) {
39 | slideDown(child);
40 | } else if (dyConsumed < 0) {
41 | slideUp(child);
42 | }
43 | }
44 |
45 | private void slideUp(BottomNavigationView child) {
46 | child.clearDisappearingChildren();
47 | child.animate().translationY(0).setDuration(50);
48 | }
49 |
50 | private void slideDown(BottomNavigationView child) {
51 | child.clearDisappearingChildren();
52 | child.animate().translationY(height).setDuration(110);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Notifications/OreoNotification.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Notifications;
2 | import android.annotation.TargetApi;
3 | import android.app.Notification;
4 | import android.app.NotificationChannel;
5 | import android.app.NotificationManager;
6 | import android.app.PendingIntent;
7 | import android.content.Context;
8 | import android.content.ContextWrapper;
9 | import android.net.Uri;
10 | import android.os.Build;
11 |
12 | import com.deveu.copus.app.R;
13 |
14 |
15 | public class OreoNotification extends ContextWrapper {
16 |
17 |
18 |
19 | private static final String CHANNEL_ID = "com.deveu.copus.app";
20 | private static final String CHANNEL_NAME = "Codeopus";
21 |
22 | private NotificationManager notificationManager;
23 |
24 | public OreoNotification(Context base){
25 | super(base);
26 |
27 |
28 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
29 | createChannel();
30 | }
31 |
32 | }
33 |
34 | @TargetApi(Build.VERSION_CODES.O)
35 |
36 | private void createChannel(){
37 | NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
38 | channel.enableLights(false);
39 | channel.enableVibration(true);
40 | channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
41 |
42 | getManager().createNotificationChannel(channel);
43 | }
44 |
45 | public NotificationManager getManager(){
46 | if(notificationManager == null){
47 | notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
48 | }
49 |
50 | return notificationManager;
51 | }
52 |
53 | @TargetApi(Build.VERSION_CODES.O)
54 |
55 | public Notification.Builder getOreoNotification(String title, String body, PendingIntent pendingIntent, Uri soundUri){
56 |
57 | return new Notification.Builder(getApplicationContext(), CHANNEL_ID).setContentIntent(pendingIntent)
58 | .setContentTitle(title)
59 | .setContentText(body)
60 | .setSmallIcon(R.mipmap.ic_launcher_foreground)
61 | .setSound(soundUri)
62 | .setAutoCancel(true);
63 | }
64 |
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_pdf.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/ViewHolderMyBooks.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.RatingBar;
7 | import android.widget.TextView;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.recyclerview.widget.RecyclerView;
11 |
12 |
13 | import com.deveu.copus.app.R;
14 | import com.squareup.picasso.Picasso;
15 |
16 | public class ViewHolderMyBooks extends RecyclerView.ViewHolder {
17 |
18 | View mView;
19 | public RatingBar rtw;
20 | public ViewHolderMyBooks(@NonNull View itemView) {
21 | super(itemView);
22 |
23 | mView = itemView;
24 | rtw = itemView.findViewById(R.id.ratingBarItem);
25 |
26 | //item click
27 |
28 | itemView.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View view) {
31 | mClickListener.onItemClick(view, getAdapterPosition());
32 | }
33 | });
34 |
35 |
36 | //item long click
37 |
38 | itemView.setOnLongClickListener(new View.OnLongClickListener() {
39 | @Override
40 | public boolean onLongClick(View view) {
41 | mClickListener.onItemLongClick(view, getAdapterPosition());
42 | return true;
43 | }
44 | });
45 |
46 | }
47 |
48 |
49 | public void setDetails (Context ctx, String bookid, String bookname, String bookphoto, String pdflink
50 |
51 | ){
52 | TextView mBookName = mView.findViewById(R.id.name_book);
53 | ImageView mBookImage = mView.findViewById(R.id.commentuserpic);
54 |
55 | mBookName.setText(bookname);
56 | Picasso.get().load(bookphoto).resize(500,600)
57 | .into(mBookImage);
58 |
59 |
60 |
61 |
62 | }
63 |
64 | private ClickListener mClickListener;
65 |
66 |
67 | //interface to send callbacks
68 |
69 | public interface ClickListener{
70 | void onItemClick(View view, int position);
71 | void onItemLongClick(View view, int position);
72 | }
73 |
74 | public void setOnClickListener(ClickListener clickListener){
75 |
76 | mClickListener = clickListener;
77 |
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_book.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
22 |
23 |
37 |
38 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_bookseach.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
23 |
24 |
38 |
39 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/ViewHolderBooks.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.RatingBar;
7 | import android.widget.TextView;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.recyclerview.widget.RecyclerView;
11 |
12 |
13 | import com.deveu.copus.app.R;
14 | import com.squareup.picasso.Picasso;
15 |
16 | public class ViewHolderBooks extends RecyclerView.ViewHolder {
17 |
18 | View mView;
19 | public RatingBar rtw;
20 | public ViewHolderBooks(@NonNull View itemView) {
21 | super(itemView);
22 |
23 | mView = itemView;
24 | rtw = itemView.findViewById(R.id.ratingBarItem);
25 |
26 | //item click
27 |
28 | itemView.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View view) {
31 | mClickListener.onItemClick(view, getAdapterPosition());
32 | }
33 | });
34 |
35 |
36 | //item long click
37 |
38 | itemView.setOnLongClickListener(new View.OnLongClickListener() {
39 | @Override
40 | public boolean onLongClick(View view) {
41 | mClickListener.onItemLongClick(view, getAdapterPosition());
42 | return true;
43 | }
44 | });
45 |
46 | }
47 |
48 |
49 | public void setDetails (Context ctx, String bookid, String bookname, String bookdescription, String bookphoto, long viewcount, long downcount, long likecount, String categoryid, long count, long bookpage, String authorname, String pdflink
50 |
51 | ){
52 | TextView mBookName = mView.findViewById(R.id.name_book);
53 | ImageView mBookImage = mView.findViewById(R.id.commentuserpic);
54 |
55 | mBookName.setText(bookname);
56 | Picasso.get().load(bookphoto).resize(500,600)
57 | .into(mBookImage);
58 |
59 |
60 |
61 |
62 | }
63 |
64 | private ClickListener mClickListener;
65 |
66 |
67 | //interface to send callbacks
68 |
69 | public interface ClickListener{
70 | void onItemClick(View view, int position);
71 | void onItemLongClick(View view, int position);
72 | }
73 |
74 | public void setOnClickListener(ClickListener clickListener){
75 |
76 | mClickListener = clickListener;
77 |
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_search.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
28 |
29 |
38 |
39 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/ViewHolderBookSearch.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.RatingBar;
7 | import android.widget.TextView;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.recyclerview.widget.RecyclerView;
11 |
12 |
13 | import com.deveu.copus.app.R;
14 | import com.squareup.picasso.Picasso;
15 |
16 | public class ViewHolderBookSearch extends RecyclerView.ViewHolder {
17 |
18 | View mView;
19 | public RatingBar rtw;
20 | public ViewHolderBookSearch(@NonNull View itemView) {
21 | super(itemView);
22 |
23 | mView = itemView;
24 | rtw = itemView.findViewById(R.id.ratingBarItem);
25 |
26 | //item click
27 |
28 | itemView.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View view) {
31 | mClickListener.onItemClick(view, getAdapterPosition());
32 | }
33 | });
34 |
35 |
36 | //item long click
37 |
38 | itemView.setOnLongClickListener(new View.OnLongClickListener() {
39 | @Override
40 | public boolean onLongClick(View view) {
41 | mClickListener.onItemLongClick(view, getAdapterPosition());
42 | return true;
43 | }
44 | });
45 |
46 | }
47 |
48 |
49 | public void setDetails (Context ctx, String bookid, String bookname, String bookdescription, String bookphoto, long viewcount, long downcount, long likecount, String categoryid, long count, long bookpage, String authorname, String pdflink
50 |
51 | ){
52 | TextView mBookName = mView.findViewById(R.id.name_book);
53 | ImageView mBookImage = mView.findViewById(R.id.commentuserpic);
54 |
55 | mBookName.setText(bookname);
56 | Picasso.get().load(bookphoto).resize(500,600)
57 | .into(mBookImage);
58 |
59 |
60 |
61 |
62 | }
63 |
64 | private ClickListener mClickListener;
65 |
66 |
67 | //interface to send callbacks
68 |
69 | public interface ClickListener{
70 | void onItemClick(View view, int position);
71 | void onItemLongClick(View view, int position);
72 | }
73 |
74 | public void setOnClickListener(ClickListener clickListener){
75 |
76 | mClickListener = clickListener;
77 |
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | android {
3 | signingConfigs {
4 | release {
5 |
6 |
7 | }
8 | }
9 | compileSdkVersion 29
10 | defaultConfig {
11 | applicationId "com.deveu.copus.app"
12 | minSdkVersion 21
13 | targetSdkVersion 29
14 | versionCode 8
15 | versionName "1.4"
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | signingConfig signingConfigs.release
18 | }
19 | lintOptions {
20 |
21 | checkReleaseBuilds false
22 |
23 | }
24 | buildTypes {
25 | release {
26 | minifyEnabled false
27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28 | signingConfig signingConfigs.release
29 | }
30 | debug {
31 | minifyEnabled false
32 | signingConfig signingConfigs.release
33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34 | }
35 | }
36 | sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/res/assets/'] } }
37 | compileOptions {
38 | sourceCompatibility = 1.8
39 | targetCompatibility = 1.8
40 | }
41 | }
42 | dependencies {
43 | implementation fileTree(dir: 'libs', include: ['*.jar'])
44 | implementation 'androidx.appcompat:appcompat:1.1.0'
45 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
46 | implementation 'com.google.firebase:firebase-auth:19.2.0'
47 | implementation 'com.google.firebase:firebase-storage:19.1.1'
48 | implementation 'com.google.firebase:firebase-database:19.2.1'
49 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
50 | implementation 'com.google.firebase:firebase-messaging:17.3.4'
51 | // implementation 'com.google.firebase:firebase-ads:17.0.0'
52 | testImplementation 'junit:junit:4.12'
53 | implementation 'de.hdodenhof:circleimageview:2.2.0'
54 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
55 | implementation 'com.squareup.picasso:picasso:2.71828'
56 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
57 | implementation 'androidx.recyclerview:recyclerview:1.1.0'
58 | implementation 'com.google.android.gms:play-services-auth:17.0.0'
59 | implementation 'com.firebaseui:firebase-ui-database:0.4.0'
60 | implementation 'com.google.android.gms:play-services-ads:18.3.0'
61 | implementation 'com.github.bumptech.glide:glide:3.7.0'
62 | implementation 'com.airbnb.android:lottie:3.0.0-beta2'
63 | implementation 'com.google.android.material:material:1.1.0'
64 |
65 |
66 |
67 |
68 |
69 | }
70 | apply plugin: 'com.google.gms.google-services'
71 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_app_logo.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_bottom_navi.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
25 |
26 |
27 |
37 |
38 |
39 |
40 |
41 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/BottomNavi/ComputerFragment.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.BottomNavi;
2 |
3 |
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 |
7 | import androidx.annotation.Nullable;
8 | import androidx.fragment.app.Fragment;
9 |
10 | import android.text.TextUtils;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 | import android.widget.Button;
15 | import android.widget.EditText;
16 | import android.widget.Toast;
17 |
18 | import com.deveu.copus.app.R;
19 |
20 |
21 | /**
22 | * A simple {@link Fragment} subclass.
23 | */
24 | public class ComputerFragment extends Fragment {
25 |
26 |
27 | EditText subject_edit, message_edit,to;
28 | Button send;
29 | public ComputerFragment() {
30 | // Required empty public constructor
31 | }
32 |
33 |
34 | @Override
35 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
36 | Bundle savedInstanceState) {
37 | // Inflate the layout for this fragment
38 |
39 |
40 |
41 | return inflater.inflate(R.layout.fragment_computer, container, false);
42 | }
43 |
44 |
45 | @Override
46 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {
47 | super.onActivityCreated(savedInstanceState);
48 |
49 | subject_edit = getView().findViewById(R.id.subject_edit);
50 | message_edit = getView().findViewById(R.id.message_edit);
51 | send = getView().findViewById(R.id.send);
52 |
53 |
54 |
55 |
56 |
57 | send.setOnClickListener(v -> {
58 | if(TextUtils.isEmpty(subject_edit.getText().toString())){
59 | Toast.makeText(getActivity(), "Please fill required areas!", Toast.LENGTH_SHORT).show();
60 | }else if (TextUtils.isEmpty(message_edit.getText().toString())){
61 | Toast.makeText(getActivity(), "Please fill required areas!", Toast.LENGTH_SHORT).show();
62 |
63 | }else{
64 | sendMail();
65 | }
66 |
67 |
68 | });
69 |
70 | }
71 |
72 | private void sendMail() {
73 | String to = "programmingbookscoder@gmail.com";
74 | // String recipientList = to.getText().toString();
75 | String[] recipients = to.split(",");
76 | String subject = subject_edit.getText().toString();
77 | String message = message_edit.getText().toString();
78 |
79 | Intent intent = new Intent(Intent.ACTION_SEND);
80 | intent.putExtra(Intent.EXTRA_EMAIL, recipients);
81 | intent.putExtra(Intent.EXTRA_SUBJECT, subject);
82 | intent.putExtra(Intent.EXTRA_TEXT, message);
83 |
84 | intent.setType("message/rfc822");
85 | startActivity(Intent.createChooser(intent, "Choose an email client"));
86 | }
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
9 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
25 |
26 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_book_profile2.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
22 |
23 |
35 |
36 |
48 |
49 |
57 |
58 |
70 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
52 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sign_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
29 |
30 |
31 |
45 |
46 |
58 |
59 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Notifications/MyFirebaseMessagingService.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Notifications;
2 |
3 | import android.app.Notification;
4 | import android.app.NotificationManager;
5 | import android.app.PendingIntent;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.media.RingtoneManager;
9 | import android.net.Uri;
10 | import android.os.Build;
11 |
12 | import androidx.core.app.NotificationCompat;
13 |
14 |
15 | import com.deveu.copus.app.BottomNavi.bottomNavi;
16 | import com.deveu.copus.app.R;
17 | import com.google.firebase.auth.FirebaseAuth;
18 | import com.google.firebase.auth.FirebaseUser;
19 | import com.google.firebase.messaging.FirebaseMessagingService;
20 | import com.google.firebase.messaging.RemoteMessage;
21 |
22 | public class MyFirebaseMessagingService extends FirebaseMessagingService {
23 | public static int NOTIFICATION_ID = 1;
24 | @Override
25 | public void onMessageReceived(RemoteMessage remoteMessage) {
26 |
27 | FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
28 |
29 | if(firebaseUser != null){
30 |
31 |
32 |
33 |
34 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
35 | sendOreoNotification(remoteMessage.getNotification().getBody(),remoteMessage.getNotification().getTitle());
36 | }else{
37 | generateNotification(remoteMessage.getNotification().getBody(),remoteMessage.getNotification().getTitle());
38 |
39 | }
40 |
41 |
42 | }
43 |
44 |
45 | }
46 |
47 | private void generateNotification(String body, String title) {
48 |
49 |
50 | Intent intent = new Intent(this, bottomNavi.class);
51 |
52 | intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
53 | PendingIntent pendingIntent = PendingIntent.getActivity(this,0,intent,PendingIntent.FLAG_ONE_SHOT);
54 | Uri defaultSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
55 | NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
56 | .setSmallIcon(R.mipmap.ic_launcher_foreground)
57 | .setContentTitle(title)
58 | .setContentText(body)
59 | .setAutoCancel(true)
60 | .setSound(defaultSound)
61 | .setContentIntent(pendingIntent);
62 |
63 | NotificationManager noti = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
64 | if(NOTIFICATION_ID>1073741824){
65 | NOTIFICATION_ID = 0;}
66 | noti.notify(NOTIFICATION_ID++, builder.build());
67 | }
68 | private void sendOreoNotification(String body, String title){
69 |
70 | Intent intent = new Intent(this, bottomNavi.class);
71 |
72 | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
73 | PendingIntent pendingIntent = PendingIntent.getActivity(this,0,intent,PendingIntent.FLAG_ONE_SHOT);
74 | Uri defaultSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
75 |
76 | OreoNotification oreoNotification = new OreoNotification(this);
77 | Notification.Builder builder = oreoNotification.getOreoNotification(title,body,pendingIntent,
78 | defaultSound);
79 |
80 | if(NOTIFICATION_ID>1073741824){
81 | NOTIFICATION_ID = 0;}
82 | oreoNotification.getManager().notify(NOTIFICATION_ID,builder.build());
83 |
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbarforprofilebook.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
10 |
11 |
12 |
22 |
23 |
31 |
32 |
33 |
45 |
46 |
47 |
48 |
56 |
57 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_google_user_profile.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
28 |
29 |
44 |
45 |
46 |
65 |
66 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/values/font_certs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @array/com_google_android_gms_fonts_certs_dev
5 | - @array/com_google_android_gms_fonts_certs_prod
6 |
7 |
8 | -
9 | MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
10 |
11 |
12 |
13 | -
14 | MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Datas/Books.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Datas;
2 |
3 | public class Books {
4 | private String bookid;
5 | private String bookname;
6 | private String authorname;
7 | private String bookdescription;
8 | private String bookphoto;
9 | private long viewcount;
10 | private long downcount;
11 | private long likecount;
12 | private String categoryid;
13 | private long count;
14 | private long bookpage;
15 | private String pdflink;
16 |
17 | public Books() {
18 | }
19 |
20 | public Books(String bookid, String bookname, String bookdescription, String bookphoto, long viewcount, long downcount, long likecount, String categoryid, long count, long bookpage, String authorname,
21 | String pdflink) {
22 | this.bookid = bookid;
23 | this.bookname = bookname;
24 | this.bookdescription = bookdescription;
25 | this.bookphoto = bookphoto;
26 | this.viewcount = viewcount;
27 | this.downcount = downcount;
28 | this.likecount = likecount;
29 | this.categoryid = categoryid;
30 | this.count = count;
31 | this.authorname=authorname;
32 | this.bookpage = bookpage;
33 | this.pdflink = pdflink;
34 | }
35 |
36 | public String getPdflink() {
37 | return pdflink;
38 | }
39 |
40 | public void setPdflink(String pdflink) {
41 | this.pdflink = pdflink;
42 | }
43 |
44 | public String getBookid() {
45 | return bookid;
46 | }
47 |
48 | public void setBookid(String bookid) {
49 | this.bookid = bookid;
50 | }
51 |
52 | public String getBookname() {
53 | return bookname;
54 | }
55 |
56 | public void setBookname(String bookname) {
57 | this.bookname = bookname;
58 | }
59 |
60 | public String getAuthorname() {
61 | return authorname;
62 | }
63 |
64 | public void setAuthorname(String authorname) {
65 | this.authorname = authorname;
66 | }
67 |
68 | public String getBookdescription() {
69 | return bookdescription;
70 | }
71 |
72 | public void setBookdescription(String bookdescription) {
73 | this.bookdescription = bookdescription;
74 | }
75 |
76 | public String getBookphoto() {
77 | return bookphoto;
78 | }
79 |
80 | public void setBookphoto(String bookphoto) {
81 | this.bookphoto = bookphoto;
82 | }
83 |
84 | public long getViewcount() {
85 | return viewcount;
86 | }
87 |
88 | public void setViewcount(long viewcount) {
89 | this.viewcount = viewcount;
90 | }
91 |
92 | public long getDowncount() {
93 | return downcount;
94 | }
95 |
96 | public void setDowncount(long downcount) {
97 | this.downcount = downcount;
98 | }
99 |
100 | public long getLikecount() {
101 | return likecount;
102 | }
103 |
104 | public void setLikecount(long likecount) {
105 | this.likecount = likecount;
106 | }
107 |
108 | public String getCategoryid() {
109 | return categoryid;
110 | }
111 |
112 | public void setCategoryid(String categoryid) {
113 | this.categoryid = categoryid;
114 | }
115 |
116 | public long getCount() {
117 | return count;
118 | }
119 |
120 | public void setCount(long count) {
121 | this.count = count;
122 | }
123 |
124 | public long getBookpage() {
125 | return bookpage;
126 | }
127 |
128 | public void setBookpage(long bookpage) {
129 | this.bookpage = bookpage;
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/ReadingSection/Comment_activity.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.ReadingSection;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 | import android.text.TextUtils;
7 | import android.view.View;
8 | import android.widget.Button;
9 | import android.widget.EditText;
10 | import android.widget.RatingBar;
11 | import android.widget.Toast;
12 |
13 |
14 | import com.deveu.copus.app.R;
15 | import com.google.firebase.auth.FirebaseAuth;
16 | import com.google.firebase.auth.FirebaseUser;
17 | import com.google.firebase.database.DatabaseReference;
18 | import com.google.firebase.database.FirebaseDatabase;
19 |
20 | import java.text.SimpleDateFormat;
21 | import java.util.Date;
22 | import java.util.HashMap;
23 | import java.util.Locale;
24 |
25 | public class Comment_activity extends AppCompatActivity {
26 |
27 |
28 | FirebaseUser mevcutKullanici;
29 | private RatingBar rating_item;
30 | private EditText edittext_review;
31 | private Button add_review;
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.activity_comment_activity);
36 |
37 | rating_item=findViewById(R.id.rating_item);
38 | edittext_review=findViewById(R.id.edittext_review);
39 | add_review=findViewById(R.id.add_review);
40 |
41 |
42 |
43 | String bookid = getIntent().getStringExtra("bookid");
44 |
45 |
46 | DatabaseReference refrate = FirebaseDatabase.getInstance().getReference("BooksReviews")
47 | .child(bookid);
48 |
49 | mevcutKullanici = FirebaseAuth.getInstance().getCurrentUser();
50 |
51 |
52 |
53 |
54 | findViewById(R.id.imageView41).setOnClickListener(new View.OnClickListener() {
55 | @Override
56 | public void onClick(View v) {
57 | finish();
58 | }
59 | });
60 |
61 |
62 |
63 |
64 | add_review.setOnClickListener(new View.OnClickListener() {
65 | @Override
66 | public void onClick(View v) {
67 |
68 |
69 | String userreview = edittext_review.getText().toString();
70 | float rating = (rating_item.getRating());
71 | String ratingg= Float.toString(rating);
72 | if(rating!= 0.0 && !TextUtils.isEmpty(userreview)){
73 | HashMap hashMap = new HashMap<>();
74 |
75 | String currentTime = new SimpleDateFormat("HH:mm:ss",
76 | Locale.getDefault()).format(new Date());
77 | String currentDate = new SimpleDateFormat("dd-MM-yyyy",
78 | Locale.getDefault()).format(new Date());
79 | String reviewid = refrate.push().getKey();
80 | hashMap.put("review", userreview);
81 | hashMap.put("date",currentDate +" "+currentTime);
82 | hashMap.put("usid",mevcutKullanici.getUid());
83 | hashMap.put("reviewid", reviewid);
84 | hashMap.put("bookid",bookid);
85 | hashMap.put("rating", ratingg);
86 | refrate.child(reviewid).setValue(hashMap);
87 | edittext_review.setText("");
88 | rating_item.setRating(0);
89 | finish();
90 |
91 |
92 |
93 | }else{
94 | Toast.makeText(Comment_activity.this, "Please, fill required areas!", Toast.LENGTH_SHORT).show();
95 | }
96 |
97 |
98 | }
99 | });
100 |
101 |
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_review.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
30 |
31 |
43 |
44 |
55 |
56 |
67 |
68 |
82 |
83 |
98 |
99 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_comment_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
16 |
17 |
18 |
34 |
35 |
57 |
58 |
69 |
70 |
77 |
78 |
79 |
87 |
88 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_computer.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
18 |
19 |
22 |
23 |
24 |
41 |
42 |
56 |
57 |
70 |
71 |
82 |
83 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/Adapter/ReviewAdapter.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.RatingBar;
9 | import android.widget.TextView;
10 |
11 | import androidx.annotation.NonNull;
12 | import androidx.recyclerview.widget.RecyclerView;
13 |
14 | import com.bumptech.glide.Glide;
15 | import com.deveu.copus.app.Datas.Reviews;
16 | import com.deveu.copus.app.Datas.Users;
17 | import com.deveu.copus.app.R;
18 | import com.google.firebase.auth.FirebaseAuth;
19 | import com.google.firebase.auth.FirebaseUser;
20 | import com.google.firebase.database.DataSnapshot;
21 | import com.google.firebase.database.DatabaseError;
22 | import com.google.firebase.database.DatabaseReference;
23 | import com.google.firebase.database.FirebaseDatabase;
24 | import com.google.firebase.database.ValueEventListener;
25 |
26 | import java.util.List;
27 | import java.util.Map;
28 |
29 | public class ReviewAdapter extends RecyclerView.Adapter {
30 |
31 |
32 | public Context mContext;
33 | public List mGönderi;
34 | private FirebaseUser mevcutFirebaseUser;
35 |
36 | public ReviewAdapter(Context mContext, List mGönderi) {
37 | this.mContext = mContext;
38 | this.mGönderi = mGönderi;
39 | }
40 |
41 | public class viewHolder extends RecyclerView.ViewHolder{
42 | public ImageView profil_resmi;
43 | public TextView txt_kullanici_adi, txt_yorumlar,txt_date;
44 | public RatingBar rating_review;
45 | public viewHolder(@NonNull View itemView) {
46 | super(itemView);
47 |
48 | profil_resmi = itemView.findViewById(R.id.userpic_review);
49 | txt_kullanici_adi = itemView.findViewById(R.id.username__review);
50 | txt_yorumlar = itemView.findViewById(R.id.comment_review);
51 | txt_date = itemView.findViewById(R.id.date_review);
52 | rating_review = itemView.findViewById(R.id.rating_review);
53 |
54 | }
55 | }
56 | @NonNull
57 | @Override
58 | public viewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
59 |
60 | View view= LayoutInflater.from(mContext).inflate(R.layout.item_review,parent,false);
61 |
62 |
63 |
64 | return new viewHolder(view);
65 | }
66 |
67 | @Override
68 | public void onBindViewHolder(@NonNull viewHolder viewHolder, int position) {
69 |
70 | mevcutFirebaseUser= FirebaseAuth.getInstance().getCurrentUser();
71 | Reviews gonderi = mGönderi.get(position);
72 | viewHolder.txt_yorumlar.setText(gonderi.getReview());
73 | viewHolder.txt_date.setText(gonderi.getDate());
74 | //viewHolder.ratingbarreview.setRating(Float.valueOf(gonderi.getRating()));
75 | gonderenBilgileri(viewHolder.profil_resmi,viewHolder.txt_kullanici_adi,gonderi.getUsid());
76 |
77 |
78 |
79 |
80 | DatabaseReference rtdb = FirebaseDatabase.getInstance().getReference("BooksReviews")
81 | .child(gonderi.getBookid());
82 |
83 | rtdb.addValueEventListener(new ValueEventListener() {
84 | @Override
85 | public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
86 | if(dataSnapshot.exists()){
87 | long datacount = dataSnapshot.getChildrenCount();
88 | float sum = 0;
89 | for(DataSnapshot snapshot : dataSnapshot.getChildren()){
90 | Map map = (Map) snapshot.getValue();
91 | String rating = map.get("rating");
92 |
93 | float pValue = Float.parseFloat(rating);
94 | sum+=pValue;
95 |
96 | float rtx = sum / (float) datacount;
97 |
98 | viewHolder.rating_review.setRating(rtx);
99 | }
100 | }else{
101 | viewHolder.rating_review.setRating(0);
102 | }
103 | }
104 |
105 | @Override
106 | public void onCancelled(@NonNull DatabaseError databaseError) {
107 |
108 | }
109 | });
110 |
111 |
112 |
113 | }
114 |
115 |
116 |
117 | @Override
118 | public int getItemCount() {
119 | return mGönderi.size();
120 | }
121 | private void gonderenBilgileri(ImageView profil_resmi, TextView kullaniciadi, String kullaniciId){
122 | DatabaseReference veriYolu = FirebaseDatabase.getInstance().getReference("Users").child(kullaniciId);
123 | veriYolu.addValueEventListener(new ValueEventListener() {
124 | @Override
125 | public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
126 | Users kullanici = dataSnapshot.getValue(Users.class);
127 | Glide.with(mContext).load(kullanici.getUserimage()).into(profil_resmi);
128 | kullaniciadi.setText(kullanici.getUsername());
129 |
130 | }
131 |
132 | @Override
133 | public void onCancelled(@NonNull DatabaseError databaseError) {
134 |
135 | }
136 | });
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/app/src/main/java/com/deveu/copus/app/ReadingSection/BookProfile2.java:
--------------------------------------------------------------------------------
1 | package com.deveu.copus.app.ReadingSection;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 | import androidx.recyclerview.widget.RecyclerView;
5 |
6 | import android.os.Bundle;
7 |
8 |
9 | import com.deveu.copus.app.R;
10 | import com.google.firebase.auth.FirebaseUser;
11 | import com.google.firebase.database.DatabaseReference;
12 | import com.google.firebase.database.FirebaseDatabase;
13 |
14 | import java.util.ArrayList;
15 | import java.util.List;
16 |
17 | public class BookProfile2 extends AppCompatActivity {
18 | FirebaseDatabase mfirebaseDatabase;
19 | DatabaseReference mRef;
20 | FirebaseUser currentuser;
21 | private List takipListesi;
22 | private List