-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dd96ecf
Showing
110 changed files
with
2,113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.1" | ||
defaultConfig { | ||
applicationId "com.example.enrollege" | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
implementation 'androidx.recyclerview:recyclerview:1.0.0-beta01' | ||
implementation 'androidx.appcompat:appcompat:1.0.0-beta01' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.2' | ||
implementation 'androidx.recyclerview:recyclerview:1.0.0' | ||
implementation 'com.android.support:design:22.2.0' | ||
implementation 'com.google.android.material:material:1.0.0' | ||
implementation 'androidx.viewpager:viewpager:1.0.0' | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test:runner:1.2.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/com/example/enrollege/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.example.enrollege; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.InstrumentationRegistry; | ||
import androidx.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.example.enrollege", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.enrollege"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/logo" | ||
android:label="@string/app_name" | ||
android:roundIcon="@drawable/logo" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".Activities.SplashScreen"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".Activities.MainActivity"> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
76 changes: 76 additions & 0 deletions
76
app/src/main/java/com/example/enrollege/Activities/Dashboard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.example.enrollege.Activities; | ||
|
||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.fragment.app.Fragment; | ||
import androidx.fragment.app.FragmentManager; | ||
import androidx.fragment.app.FragmentPagerAdapter; | ||
import androidx.viewpager.widget.ViewPager; | ||
|
||
import com.example.enrollege.Fragments.AllPostsFragment; | ||
import com.example.enrollege.Fragments.MyPostsFragment; | ||
import com.example.enrollege.R; | ||
import com.google.android.material.tabs.TabLayout; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class Dashboard extends AppCompatActivity { | ||
ViewPager viewPager; | ||
TabLayout tabs; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.dashboard); | ||
|
||
tabs = findViewById(R.id.tabs); | ||
viewPager = findViewById(R.id.viewpager); | ||
viewPager.setAdapter(new DashboardPagerAdapter(getSupportFragmentManager())); | ||
tabs.setupWithViewPager(viewPager); | ||
|
||
tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { | ||
@Override | ||
public void onTabSelected(TabLayout.Tab tab) { | ||
viewPager.setCurrentItem(tab.getPosition(),true); | ||
} | ||
|
||
@Override | ||
public void onTabUnselected(TabLayout.Tab tab) { | ||
|
||
} | ||
|
||
@Override | ||
public void onTabReselected(TabLayout.Tab tab) { | ||
|
||
} | ||
|
||
}); | ||
|
||
|
||
} | ||
|
||
class DashboardPagerAdapter extends FragmentPagerAdapter { | ||
|
||
ArrayList<Fragment> fragments; | ||
|
||
public DashboardPagerAdapter(FragmentManager fm) { | ||
super(fm); | ||
Log.i("hi" , "hi"); | ||
fragments = new ArrayList<>(); | ||
fragments.add(0,new AllPostsFragment()); | ||
fragments.add(1,new MyPostsFragment()); | ||
} | ||
|
||
@Override | ||
public Fragment getItem(int position) { | ||
return fragments.get(position); | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return 3; | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/example/enrollege/Activities/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.example.enrollege.Activities; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.core.view.GravityCompat; | ||
import androidx.drawerlayout.widget.DrawerLayout; | ||
|
||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
|
||
import com.example.enrollege.R; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.dashboard_navigation); | ||
|
||
final DrawerLayout dashboard = (DrawerLayout) findViewById(R.id.dashboardNavigationDrawer); | ||
ImageView toolbarNavigationOpenner=(ImageView)findViewById(R.id.toolbarNavigationOpenner); | ||
toolbarNavigationOpenner.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
dashboard.openDrawer(GravityCompat.START); | ||
} | ||
}); | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
app/src/main/java/com/example/enrollege/Activities/SplashScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package com.example.enrollege.Activities; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.text.Layout; | ||
import android.view.Gravity; | ||
import android.view.View; | ||
import android.view.animation.Animation; | ||
import android.view.animation.AnimationUtils; | ||
import android.view.animation.LinearInterpolator; | ||
import android.widget.ImageView; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.core.view.GravityCompat; | ||
import androidx.drawerlayout.widget.DrawerLayout; | ||
|
||
import com.example.enrollege.R; | ||
|
||
public class SplashScreen extends AppCompatActivity { | ||
|
||
private Layout layout; | ||
private ImageView logo; | ||
private View view; | ||
private ImageView signin; | ||
|
||
Animation animFade; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
|
||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_splash_screen); | ||
|
||
view = (View)findViewById(R.id.view); | ||
signin = (ImageView)findViewById(R.id.signin); | ||
logo=(ImageView) findViewById(R.id.logo); | ||
|
||
|
||
animFade = AnimationUtils.loadAnimation(getApplicationContext(), | ||
R.anim.item_fall_down ); | ||
animFade.setInterpolator(new LinearInterpolator()); | ||
animFade.setRepeatCount(Animation.INFINITE); | ||
animFade.setDuration(2000); | ||
logo.startAnimation(animFade); | ||
|
||
view.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
signin.setVisibility(View.VISIBLE); | ||
} | ||
}); | ||
|
||
signin.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
launchActivity(); | ||
} | ||
}); | ||
|
||
} | ||
private void launchActivity() { | ||
|
||
Intent intent = new Intent(this, MainActivity.class); | ||
startActivity(intent); | ||
} | ||
|
||
} | ||
|
||
|
Oops, something went wrong.