|
@ -5,6 +5,8 @@ import android.content.SharedPreferences; |
|
|
import android.net.Uri; |
|
|
import android.net.Uri; |
|
|
import android.os.Build; |
|
|
import android.os.Build; |
|
|
import android.os.Bundle; |
|
|
import android.os.Bundle; |
|
|
|
|
|
import android.view.View; |
|
|
|
|
|
import android.widget.ImageView; |
|
|
import android.widget.Toast; |
|
|
import android.widget.Toast; |
|
|
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatDelegate; |
|
|
import androidx.appcompat.app.AppCompatDelegate; |
|
@ -57,6 +59,7 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF |
|
|
private SectionsPagerAdapter sectionsPagerAdapter; |
|
|
private SectionsPagerAdapter sectionsPagerAdapter; |
|
|
private ViewPager viewPager; |
|
|
private ViewPager viewPager; |
|
|
private TabLayout tabLayout; |
|
|
private TabLayout tabLayout; |
|
|
|
|
|
private ImageView drawerButton; |
|
|
|
|
|
|
|
|
//Fix for vector drawables on android <21
|
|
|
//Fix for vector drawables on android <21
|
|
|
static { |
|
|
static { |
|
@ -89,6 +92,7 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF |
|
|
|
|
|
|
|
|
tabLayout = findViewById(R.id.tabs); |
|
|
tabLayout = findViewById(R.id.tabs); |
|
|
viewPager = findViewById(R.id.container); |
|
|
viewPager = findViewById(R.id.container); |
|
|
|
|
|
drawerButton = findViewById(R.id.main_activity_open_drawer_btn); |
|
|
|
|
|
|
|
|
//Create the adapter that will return a fragment for each section of the activity
|
|
|
//Create the adapter that will return a fragment for each section of the activity
|
|
|
sectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); |
|
|
sectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); |
|
@ -110,6 +114,7 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF |
|
|
updateTabIcon(i); |
|
|
updateTabIcon(i); |
|
|
|
|
|
|
|
|
setMainActivity(this); |
|
|
setMainActivity(this); |
|
|
|
|
|
setDrawerButtonListener(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -287,4 +292,17 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setDrawerButtonListener() |
|
|
|
|
|
{ |
|
|
|
|
|
this.drawerButton.setOnClickListener(new View.OnClickListener() |
|
|
|
|
|
{ |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(View v) |
|
|
|
|
|
{ |
|
|
|
|
|
drawer.openDrawer(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |