Browse Source

Merge remote-tracking branch 'upstream/develop' into bookdrag

pull/71/head
babaliaris 4 years ago
parent
commit
6feaeb30af
  1. 14
      app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java
  2. 2
      build.gradle
  3. 4
      gradle/wrapper/gradle-wrapper.properties

14
app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java

@ -5,8 +5,6 @@ import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatDelegate;
@ -52,10 +50,8 @@ import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL;
public class MainActivity extends BaseActivity implements RecentFragment.RecentFragmentInteractionListener, ForumFragment.ForumFragmentInteractionListener, UnreadFragment.UnreadFragmentInteractionListener {
//-----------------------------------------CLASS VARIABLES------------------------------------------
private static final int TIME_INTERVAL = 2000;
private SharedPreferences sharedPrefs;
private static final String DRAWER_INTRO = "DRAWER_INTRO";
private long mBackPressed;
private SectionsPagerAdapter sectionsPagerAdapter;
private ViewPager viewPager;
private TabLayout tabLayout;
@ -138,17 +134,9 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF
@Override
public void onBackPressed() {
if (drawer.isDrawerOpen()) {
if (drawer.isDrawerOpen())
drawer.closeDrawer();
return;
} else if (mBackPressed + TIME_INTERVAL > System.currentTimeMillis()) {
super.onBackPressed();
return;
} else {
Toast.makeText(BaseApplication.getInstance().getApplicationContext(), "Press back again to exit!"
, Toast.LENGTH_SHORT).show();
}
mBackPressed = System.currentTimeMillis();
}
@Override

2
build.gradle

@ -9,7 +9,7 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
classpath 'org.ajoberstar.grgit:grgit-core:3.1.1' // Also change in app/gradle/grgit.gradle

4
gradle/wrapper/gradle-wrapper.properties

@ -1,6 +1,6 @@
#Mon Jul 20 13:59:13 EEST 2020
#Wed Nov 11 12:38:13 EET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

Loading…
Cancel
Save