├── .idea ├── .name ├── misc.xml ├── runConfigurations.xml ├── gradle.xml └── codeStyles │ └── Project.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ ├── p1.jpg │ │ │ │ ├── p2.jpg │ │ │ │ ├── p3.jpg │ │ │ │ ├── btn_round.xml │ │ │ │ ├── txt_background.xml │ │ │ │ ├── ic_add_black_24dp.xml │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ ├── ic_send_black_24dp.xml │ │ │ │ ├── ic_comment.xml │ │ │ │ ├── ic_arrow_back_black_24dp.xml │ │ │ │ ├── ic_favorite_red.xml │ │ │ │ ├── ic_more_vert_black_24dp.xml │ │ │ │ ├── ic_exit_to_app_black_24dp.xml │ │ │ │ ├── ic_delete_forever_black_24dp.xml │ │ │ │ ├── ic_person_outline_black_24dp.xml │ │ │ │ ├── ic_search_black_24dp.xml │ │ │ │ ├── ic_favorite_outline.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── font │ │ │ │ └── leckerlione_regular.ttf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ ├── menu_account.xml │ │ │ │ ├── menu_post_options.xml │ │ │ │ ├── menu_search.xml │ │ │ │ └── menu_main.xml │ │ │ ├── layout │ │ │ │ ├── activity_auth.xml │ │ │ │ ├── layout_account_post.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── view_pager.xml │ │ │ │ ├── layout_home.xml │ │ │ │ ├── activity_on_board.xml │ │ │ │ ├── activity_home.xml │ │ │ │ ├── activity_edit_post.xml │ │ │ │ ├── activity_comment.xml │ │ │ │ ├── layout_comment.xml │ │ │ │ ├── activity_user_info.xml │ │ │ │ ├── activity_edit_user_info.xml │ │ │ │ ├── activity_add_post.xml │ │ │ │ ├── layout_sign_in.xml │ │ │ │ ├── layout_account.xml │ │ │ │ ├── layout_sign_up.xml │ │ │ │ └── layout_post.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── habib │ │ │ │ └── blogapp │ │ │ │ ├── AuthActivity.java │ │ │ │ ├── Models │ │ │ │ ├── User.java │ │ │ │ ├── Comment.java │ │ │ │ └── Post.java │ │ │ │ ├── Constant.java │ │ │ │ ├── Adapters │ │ │ │ ├── AccountPostAdapter.java │ │ │ │ ├── ViewPagerAdapter.java │ │ │ │ ├── CommentsAdapter.java │ │ │ │ └── PostsAdapter.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── HomeActivity.java │ │ │ │ ├── OnBoardActivity.java │ │ │ │ ├── EditPostActivity.java │ │ │ │ ├── Fragments │ │ │ │ ├── HomeFragment.java │ │ │ │ ├── SignInFragment.java │ │ │ │ ├── SignUpFragment.java │ │ │ │ └── AccountFragment.java │ │ │ │ ├── UserInfoActivity.java │ │ │ │ ├── EditUserInfoActivity.java │ │ │ │ ├── AddPostActivity.java │ │ │ │ └── CommentActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── habib │ │ │ └── blogapp │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── habib │ │ └── blogapp │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── readme.MD ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | BlogApp -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /readme.MD: -------------------------------------------------------------------------------- 1 | ## Android Blog App 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name='BlogApp' 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BlogApp 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/drawable/p1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/drawable/p2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/p3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/drawable/p3.jpg -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/font/leckerlione_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/font/leckerlione_regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/habibmhamadi/blogapp-android-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/habibmhamadi/blogapp-android-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/habibmhamadi/blogapp-android-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/habibmhamadi/blogapp-android-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/habibmhamadi/blogapp-android-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/habibmhamadi/blogapp-android-app/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/txt_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Mar 29 22:24:21 AFT 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_account.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_post_options.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_comment.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_back_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2196f1 4 | #dddddd 5 | #2196f1 6 | #FFFFFF 7 | #000000 8 | #666666 9 | #999999 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_auth.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_red.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/test/java/com/habib/blogapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp; 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_more_vert_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_exit_to_app_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete_forever_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_account_post.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_person_outline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/habib/blogapp/AuthActivity.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.os.Bundle; 6 | 7 | import com.habib.blogapp.Fragments.SignInFragment; 8 | 9 | public class AuthActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_auth); 15 | getSupportFragmentManager().beginTransaction().replace(R.id.frameAuthContainer,new SignInFragment()).commit(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_outline.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/habib/blogapp/Models/User.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp.Models; 2 | 3 | public class User { 4 | private int id; 5 | private String userName,photo; 6 | 7 | public int getId() { 8 | return id; 9 | } 10 | 11 | public void setId(int id) { 12 | this.id = id; 13 | } 14 | 15 | public String getUserName() { 16 | return userName; 17 | } 18 | 19 | public void setUserName(String userName) { 20 | this.userName = userName; 21 | } 22 | 23 | public String getPhoto() { 24 | return photo; 25 | } 26 | 27 | public void setPhoto(String photo) { 28 | this.photo = photo; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /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 | 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 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/habib/blogapp/Models/Comment.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp.Models; 2 | 3 | public class Comment { 4 | private int id; 5 | private String comment,date; 6 | private User user; 7 | 8 | public Comment() { 9 | } 10 | 11 | public int getId() { 12 | return id; 13 | } 14 | 15 | public void setId(int id) { 16 | this.id = id; 17 | } 18 | 19 | public String getComment() { 20 | return comment; 21 | } 22 | 23 | public void setComment(String comment) { 24 | this.comment = comment; 25 | } 26 | 27 | public String getDate() { 28 | return date; 29 | } 30 | 31 | public void setDate(String date) { 32 | this.date = date; 33 | } 34 | 35 | public User getUser() { 36 | return user; 37 | } 38 | 39 | public void setUser(User user) { 40 | this.user = user; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/habib/blogapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp; 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.habib.blogapp", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/habib/blogapp/Constant.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp; 2 | 3 | public class Constant { 4 | public static final String URL = "http://192.168.43.123/"; 5 | public static final String HOME = URL+"api"; 6 | public static final String LOGIN = HOME+"/login"; 7 | public static final String LOGOUT = HOME+"/logout"; 8 | public static final String REGISTER = HOME+"/register"; 9 | public static final String SAVE_USER_INFO = HOME+"/save_user_info"; 10 | public static final String POSTS = HOME+"/posts"; 11 | public static final String ADD_POST = POSTS+"/create"; 12 | public static final String UPDATE_POST = POSTS+"/update"; 13 | public static final String DELETE_POST = POSTS+"/delete"; 14 | public static final String LIKE_POST = POSTS+"/like"; 15 | public static final String COMMENTS = POSTS+"/comments"; 16 | public static final String CREATE_COMMENT = HOME+"/comments/create"; 17 | public static final String DELETE_COMMENT = HOME+"/comments/delete"; 18 | public static final String MY_POST = POSTS+"/my_posts"; 19 | } 20 | -------------------------------------------------------------------------------- /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/res/layout/view_pager.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 25 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.3" 6 | defaultConfig { 7 | applicationId "com.habib.blogapp" 8 | minSdkVersion 21 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | compileOptions { 21 | sourceCompatibility = 1.8 22 | targetCompatibility = 1.8 23 | } 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation 'androidx.appcompat:appcompat:1.1.0' 29 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 30 | testImplementation 'junit:junit:4.12' 31 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 33 | implementation 'com.google.android.material:material:1.1.0' 34 | implementation 'de.hdodenhof:circleimageview:3.1.0' 35 | implementation 'com.android.volley:volley:1.1.1' 36 | implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' 37 | implementation 'com.squareup.picasso:picasso:2.71828' 38 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/habib/blogapp/Models/Post.java: -------------------------------------------------------------------------------- 1 | package com.habib.blogapp.Models; 2 | 3 | public class Post { 4 | private int id,likes,comments; 5 | private String date,desc,photo; 6 | private User user; 7 | private boolean selfLike; 8 | 9 | public int getId() { 10 | return id; 11 | } 12 | 13 | public void setId(int id) { 14 | this.id = id; 15 | } 16 | 17 | public int getLikes() { 18 | return likes; 19 | } 20 | 21 | public void setLikes(int likes) { 22 | this.likes = likes; 23 | } 24 | 25 | public int getComments() { 26 | return comments; 27 | } 28 | 29 | public void setComments(int comments) { 30 | this.comments = comments; 31 | } 32 | 33 | public String getDate() { 34 | return date; 35 | } 36 | 37 | public void setDate(String date) { 38 | this.date = date; 39 | } 40 | 41 | public String getDesc() { 42 | return desc; 43 | } 44 | 45 | public void setDesc(String desc) { 46 | this.desc = desc; 47 | } 48 | 49 | public String getPhoto() { 50 | return photo; 51 | } 52 | 53 | public void setPhoto(String photo) { 54 | this.photo = photo; 55 | } 56 | 57 | public User getUser() { 58 | return user; 59 | } 60 | 61 | public void setUser(User user) { 62 | this.user = user; 63 | } 64 | 65 | public boolean isSelfLike() { 66 | return selfLike; 67 | } 68 | 69 | public void setSelfLike(boolean selfLike) { 70 | this.selfLike = selfLike; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 23 | 24 | 25 | 26 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_on_board.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 14 | 15 | 20 | 21 |