Skip to content

Commit

Permalink
some of bugs were eliminated, libraries and also gradle were updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdisahraeei committed Aug 16, 2022
1 parent f7a3182 commit b350072
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 95 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 22 additions & 30 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ plugins {
}

android {
compileSdk 30
compileSdk 32

defaultConfig {
applicationId "com.mahdi.yumnote"
minSdk 21
targetSdk 30
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}


//adding--for--binding
dataBinding
{
Expand All @@ -33,53 +34,47 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

dependencies {


//default
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

//about viewmodel
implementation 'androidx.activity:activity-ktx:1.2.0-alpha05'
implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha05'
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"

implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'

//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.google.code.gson:gson:2.9.0'


//rxjava and rxandroid
implementation "com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0"
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'io.reactivex.rxjava3:rxjava:3.0.3'
implementation 'io.reactivex.rxjava3:rxjava:3.1.5'


//Dagger
implementation 'org.jetbrains:annotations:15.0'
implementation 'com.google.dagger:dagger:2.33'
implementation 'com.google.ar:core:1.23.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.33'
implementation 'com.google.dagger:dagger:2.43.2'
annotationProcessor 'com.google.dagger:dagger-compiler:2.43.2'


//daimajia slider , picasso library
implementation "com.android.support:support-v4:+"
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'

implementation 'com.github.bumptech.glide:glide:4.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'

//Bottom Navygation
implementation 'com.github.felixsoares:BottomNavygation:1.8.6'
Expand All @@ -90,10 +85,7 @@ dependencies {






testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
}
10 changes: 2 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mahdi.yumnote">


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/icon_round"
android:label="@string/app_name"
android:roundIcon="@drawable/ic_launcher"
android:roundIcon="@mipmap/icon_round"
android:supportsRtl="true"
android:theme="@style/Theme.YumNote"
android:usesCleartextTraffic="true">
Expand All @@ -24,14 +22,11 @@
android:exported="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />

<activity
android:name=".ui.main.activity.MainActivity"
android:exported="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />


<activity
android:name=".ui.login.LoginActivity"
android:exported="true"
Expand All @@ -45,5 +40,4 @@
</activity>
</application>


</manifest>
Binary file added app/src/main/icon-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.mahdi.yumnote.di.Modules.mainactivity;


import com.mahdi.yumnote.di.other.DefaultFragment;
import dagger.Module;
import dagger.Provides;



@Module
public class ModuleFragment {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dagger.Module;
import dagger.Provides;


@Module
public class ModuleSlider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ public ImageUploadRx getShowValueRx()
}



}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.mahdi.yumnote.di.component;


import com.mahdi.yumnote.di.other.DefaultFragment;
import com.mahdi.yumnote.other.SliderView.Slider;
import com.mahdi.yumnote.other.bottomnavigation.BottomNavigation;
import com.mahdi.yumnote.rx.main.fragments.note.JsonDisplayRx;
import com.mahdi.yumnote.rx.main.fragments.profile.ImageUploadRx;
import com.mahdi.yumnote.rx.main.fragments.profile.ShowValueRx;
import com.mahdi.yumnote.di.other.DefaultFragment;
import dagger.Component;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@




public class DefaultFragment {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
import com.mahdi.yumnote.R;



Expand All @@ -21,9 +20,9 @@ public CustomSliderView(Context context) {

public View getView() {

View view = LayoutInflater.from(this.getContext()).inflate(R.layout.render_type_text, null);
ImageView target = view.findViewById(R.id.daimajia_slider_image);
LinearLayout frame = view.findViewById(R.id.description_layout);
View view = LayoutInflater.from(this.getContext()).inflate(com.daimajia.slider.library.R.layout.render_type_text, null);
ImageView target = view.findViewById(com.daimajia.slider.library.R.id.daimajia_slider_image);
LinearLayout frame = view.findViewById(com.daimajia.slider.library.R.id.description_layout);
frame.setBackgroundColor(Color.TRANSPARENT);

this.bindEventAndShow(view, target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public JsonDisplayRx() {
}


public JsonDisplayRx(View view) {
this.view = view;
}


public void jsoning(View view) {
ApiServices2 api = JsonClient.getApiServices();
Expand All @@ -65,7 +61,7 @@ public void onNext(@NonNull List<PosterModel> list) {
recyclerView.setAdapter(adabter);


Clicking();
Clicking(view);
}

@Override
Expand All @@ -84,29 +80,29 @@ public void onComplete() {



public void Clicking()
public void Clicking(View vc)
{
adabter.setOnItemClickListener(new CustomAdabter.ClickListener() {
@Override
public void onItemClick(int position, View v) {
switch (position)
{
case 0:
view.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://login.wordpress.org")));
vc.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://login.wordpress.org")));
break;
case 1:
view.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://www.codechef.com")));
vc.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://www.codechef.com")));
break;
case 2:
view.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://www.base64encode.org")));
vc.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://www.base64encode.org")));
break;

case 3:
view.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://developer.android.com")));
vc.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://developer.android.com")));
break;

case 4:
view.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://stackoverflow.com")));
vc.getContext().startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://stackoverflow.com")));
break;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import com.mahdi.yumnote.model.retrofit.api1.ProfileServer;
import com.mahdi.yumnote.networking.retrofit.api.ApiServices1;
import com.mahdi.yumnote.networking.retrofit.client.RetrofitClient;

import javax.inject.Inject;

import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mahdi.yumnote.ui.login;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mahdi.yumnote.ui.login;

import android.content.Context;

import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_ha.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ha">

</androidx.constraintlayout.widget.ConstraintLayout>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/foreground"/>
<foreground android:drawable="@mipmap/icon_foreground"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-hdpi/icon_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/icon_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/icon_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/icon_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/main/res/values/foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="foreground">#F0F1CB</color>
</resources>
22 changes: 3 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
maven { url 'https://jitpack.io' }
maven { url "https://oss.jfrog.org/libs-snapshot" }
google()
mavenCentral()
}
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}

task clean(type: Delete) {
Expand Down
20 changes: 9 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
#Mon Aug 15 20:18:46 IRDT 2022
android.nonTransitiveRClass=true
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding\=UTF-8
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=true
Loading

0 comments on commit b350072

Please sign in to comment.