Skip to content

Commit a1bf7ae

Browse files
committed
First commit
1 parent 234397d commit a1bf7ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+833
-0
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild
10+
.idea

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.2"
6+
defaultConfig {
7+
applicationId "in.pclub.auth_er"
8+
minSdkVersion 17
9+
targetSdkVersion 25
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25+
exclude group: 'com.android.support', module: 'support-annotations'
26+
})
27+
compile 'com.android.support:appcompat-v7:25.1.0'
28+
compile 'com.android.support:design:25.1.0'
29+
testCompile 'junit:junit:4.12'
30+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/saksham/Android/Sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package in.pclub.auth_er;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("in.pclub.auth_er", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="in.pclub.auth_er">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity
12+
android:name=".HomePage"
13+
android:label="@string/title_activity_home_page"
14+
android:theme="@style/AppTheme.NoActionBar">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
package in.pclub.auth_er;
2+
3+
import android.os.Bundle;
4+
import android.support.design.widget.FloatingActionButton;
5+
import android.support.design.widget.Snackbar;
6+
import android.view.View;
7+
import android.support.design.widget.NavigationView;
8+
import android.support.v4.view.GravityCompat;
9+
import android.support.v4.widget.DrawerLayout;
10+
import android.support.v7.app.ActionBarDrawerToggle;
11+
import android.support.v7.app.AppCompatActivity;
12+
import android.support.v7.widget.Toolbar;
13+
import android.view.Menu;
14+
import android.view.MenuItem;
15+
16+
public class HomePage extends AppCompatActivity
17+
implements NavigationView.OnNavigationItemSelectedListener {
18+
19+
@Override
20+
protected void onCreate(Bundle savedInstanceState) {
21+
super.onCreate(savedInstanceState);
22+
setContentView(R.layout.activity_home_page2);
23+
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
24+
setSupportActionBar(toolbar);
25+
26+
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
27+
fab.setOnClickListener(new View.OnClickListener() {
28+
@Override
29+
public void onClick(View view) {
30+
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
31+
.setAction("Action", null).show();
32+
}
33+
});
34+
35+
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
36+
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
37+
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
38+
drawer.setDrawerListener(toggle);
39+
toggle.syncState();
40+
41+
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
42+
navigationView.setNavigationItemSelectedListener(this);
43+
}
44+
45+
@Override
46+
public void onBackPressed() {
47+
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
48+
if (drawer.isDrawerOpen(GravityCompat.START)) {
49+
drawer.closeDrawer(GravityCompat.START);
50+
} else {
51+
super.onBackPressed();
52+
}
53+
}
54+
55+
@Override
56+
public boolean onCreateOptionsMenu(Menu menu) {
57+
// Inflate the menu; this adds items to the action bar if it is present.
58+
getMenuInflater().inflate(R.menu.home_page, menu);
59+
return true;
60+
}
61+
62+
@Override
63+
public boolean onOptionsItemSelected(MenuItem item) {
64+
// Handle action bar item clicks here. The action bar will
65+
// automatically handle clicks on the Home/Up button, so long
66+
// as you specify a parent activity in AndroidManifest.xml.
67+
int id = item.getItemId();
68+
69+
//noinspection SimplifiableIfStatement
70+
if (id == R.id.action_settings) {
71+
return true;
72+
}
73+
74+
return super.onOptionsItemSelected(item);
75+
}
76+
77+
@SuppressWarnings("StatementWithEmptyBody")
78+
@Override
79+
public boolean onNavigationItemSelected(MenuItem item) {
80+
// Handle navigation view item clicks here.
81+
int id = item.getItemId();
82+
83+
if (id == R.id.nav_camera) {
84+
// Handle the camera action
85+
} else if (id == R.id.nav_gallery) {
86+
87+
} else if (id == R.id.nav_slideshow) {
88+
89+
} else if (id == R.id.nav_manage) {
90+
91+
} else if (id == R.id.nav_share) {
92+
93+
} else if (id == R.id.nav_send) {
94+
95+
}
96+
97+
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
98+
drawer.closeDrawer(GravityCompat.START);
99+
return true;
100+
}
101+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
9+
<path
10+
android:fillColor="#FF000000"
11+
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
12+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportHeight="24.0"
5+
android:viewportWidth="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:shape="rectangle">
3+
<gradient
4+
android:angle="135"
5+
android:centerColor="#4CAF50"
6+
android:endColor="#2E7D32"
7+
android:startColor="#81C784"
8+
android:type="linear" />
9+
</shape>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/activity_home_page"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
android:paddingLeft="@dimen/activity_horizontal_margin"
10+
android:paddingRight="@dimen/activity_horizontal_margin"
11+
android:paddingTop="@dimen/activity_vertical_margin"
12+
tools:showIn="@layout/app_bar_main">
13+
14+
<!--
15+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
16+
tools:context="in.pclub.auth_er.HomePage"
17+
-->
18+
19+
<TextView
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content"
22+
android:text="Hello World!" />
23+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/drawer_layout"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:fitsSystemWindows="true"
9+
tools:openDrawer="start">
10+
11+
<include
12+
layout="@layout/app_bar_home_page"
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent" />
15+
16+
<android.support.design.widget.NavigationView
17+
android:id="@+id/nav_view"
18+
android:layout_width="wrap_content"
19+
android:layout_height="match_parent"
20+
android:layout_gravity="start"
21+
android:fitsSystemWindows="true"
22+
app:headerLayout="@layout/nav_header_home_page"
23+
app:menu="@menu/activity_home_page2_drawer" />
24+
25+
</android.support.v4.widget.DrawerLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
8+
tools:context="in.pclub.auth_er.HomePage">
9+
10+
<android.support.design.widget.AppBarLayout
11+
android:layout_width="match_parent"
12+
android:layout_height="wrap_content"
13+
android:theme="@style/AppTheme.AppBarOverlay">
14+
15+
<android.support.v7.widget.Toolbar
16+
android:id="@+id/toolbar"
17+
android:layout_width="match_parent"
18+
android:layout_height="?attr/actionBarSize"
19+
android:background="?attr/colorPrimary"
20+
app:popupTheme="@style/AppTheme.PopupOverlay" />
21+
22+
</android.support.design.widget.AppBarLayout>
23+
24+
<include layout="@layout/content_home_page" />
25+
26+
<android.support.design.widget.FloatingActionButton
27+
android:id="@+id/fab"
28+
android:layout_width="wrap_content"
29+
android:layout_height="wrap_content"
30+
android:layout_gravity="bottom|end"
31+
android:layout_margin="@dimen/fab_margin"
32+
app:srcCompat="@android:drawable/ic_dialog_email" />
33+
34+
</android.support.design.widget.CoordinatorLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/content_home_page"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
android:paddingLeft="@dimen/activity_horizontal_margin"
10+
android:paddingRight="@dimen/activity_horizontal_margin"
11+
android:paddingTop="@dimen/activity_vertical_margin"
12+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
13+
tools:context="in.pclub.auth_er.HomePage"
14+
tools:showIn="@layout/app_bar_home_page">
15+
16+
</RelativeLayout>

0 commit comments

Comments
 (0)