diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
new file mode 100644
index 0000000..a5471b3
--- /dev/null
+++ b/.idea/assetWizardSettings.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index 377710b..1894b11 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..5806fb3
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 99202cc..c0f68ed 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index 2a4c2d2..0ae1b97 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,8 +21,12 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
+ implementation 'com.android.support:cardview-v7:27.1.1'
+ implementation 'com.android.support:recyclerview-v7:27.1.1'
+ implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation 'com.android.support:design:27.1.1'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4107d95..630426e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -9,10 +9,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+
+
+
-
+
diff --git a/app/src/main/java/com/example/mypc/firstskool/Courses.java b/app/src/main/java/com/example/mypc/firstskool/Courses.java
new file mode 100644
index 0000000..81efb2e
--- /dev/null
+++ b/app/src/main/java/com/example/mypc/firstskool/Courses.java
@@ -0,0 +1,47 @@
+package com.example.mypc.firstskool;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class Courses extends AppCompatActivity {
+
+ private RecyclerView recyclerView1, recyclerView2;
+ private RecyclerView.LayoutManager layoutManager, layoutManager2;
+ private List listClass;
+ private List listExams;
+ private RecyclerViewAdapter adapter, adapter2;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_courses);
+
+ // ----------- First Recycler view for class ------------------------
+
+ recyclerView1 = findViewById(R.id.recyclerview);
+ layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
+ recyclerView1.setLayoutManager(layoutManager);
+ listClass = Arrays.asList(getResources().getStringArray(R.array.Class));
+ adapter = new RecyclerViewAdapter(listClass);
+ recyclerView1.setHasFixedSize(true);
+ recyclerView1.setAdapter(adapter);
+
+
+
+ // --------------- Second recycler view for Exams --------------------
+ recyclerView2 = findViewById(R.id.recyclerviewexams);
+ layoutManager2 = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
+ recyclerView2.setLayoutManager(layoutManager2);
+ listExams = Arrays.asList(getResources().getStringArray(R.array.Exams));
+ adapter2 = new RecyclerViewAdapter(listExams);
+ recyclerView2.setAdapter(adapter2);
+
+
+ }
+}
diff --git a/app/src/main/java/com/example/mypc/firstskool/LoginActivity.java b/app/src/main/java/com/example/mypc/firstskool/LoginActivity.java
new file mode 100644
index 0000000..3462e05
--- /dev/null
+++ b/app/src/main/java/com/example/mypc/firstskool/LoginActivity.java
@@ -0,0 +1,181 @@
+package com.example.mypc.firstskool;
+
+import android.content.DialogInterface;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.RelativeLayout;
+
+import com.rengwuxian.materialedittext.MaterialEditText;
+
+public class LoginActivity extends AppCompatActivity {
+
+ private Button btnSignIn;
+ private Button btnregister;
+
+ RelativeLayout rootLayout;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_login);
+
+ btnSignIn = findViewById(R.id.btnSignIn);
+ btnregister = findViewById(R.id.btnRegister);
+ rootLayout = findViewById(R.id.rootLayout);
+
+ btnregister.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ showRegisterDialog();
+ }
+ });
+
+ btnSignIn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ showLoginDialog();
+ }
+ });
+ }
+
+
+
+ private void showLoginDialog() {
+
+ final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+ dialog.setTitle("SIGN IN ");
+ dialog.setMessage("Please use Email to Sign In");
+
+ LayoutInflater inflater = LayoutInflater.from(this);
+ View login_layout = inflater.inflate(R.layout.login_layout, null);
+
+ final MaterialEditText edtemail = login_layout.findViewById(R.id.edtemail);
+ final MaterialEditText edtpassword = login_layout.findViewById(R.id.edtpassword);
+
+
+ dialog.setView(login_layout);
+
+ dialog.setPositiveButton("SIGN IN", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+
+ dialogInterface.dismiss();
+ btnSignIn.setEnabled(false);
+
+
+
+ //Checking Fields
+
+ if (TextUtils.isEmpty(edtemail.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Email id", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+ if (TextUtils.isEmpty(edtpassword.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Password", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+
+ if ((edtpassword.getText().toString().length() < 8)) {
+
+ Snackbar.make(rootLayout, "Password should be minimum of 8 characters", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+
+ // ----------------------------Login Code here -----------------
+
+
+
+ }
+ });
+
+
+ dialog.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+ dialogInterface.dismiss();
+ }
+ });
+
+
+ dialog.show();
+
+
+ }
+
+ private void showRegisterDialog() {
+
+ final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+ dialog.setTitle("REGISTER ");
+ dialog.setMessage("Please use Email to register");
+
+ LayoutInflater inflater = LayoutInflater.from(this);
+ View register_layout = inflater.inflate(R.layout.register_layout, null);
+
+ final MaterialEditText edtemail = register_layout.findViewById(R.id.edtemail);
+ final MaterialEditText edtpassword = register_layout.findViewById(R.id.edtpassword);
+ final MaterialEditText edtname = register_layout.findViewById(R.id.edtname);
+ final MaterialEditText edtphone = register_layout.findViewById(R.id.edtphone);
+
+ dialog.setView(register_layout);
+
+ dialog.setPositiveButton("REGISTER", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+
+ dialogInterface.dismiss();
+
+ //Checking about fields
+
+ if (TextUtils.isEmpty(edtemail.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Email id", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+ if (TextUtils.isEmpty(edtpassword.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Password", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+ if (TextUtils.isEmpty(edtname.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Your Name", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+ if (TextUtils.isEmpty(edtphone.getText().toString())) {
+
+ Snackbar.make(rootLayout, "Please enter Phone", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+ if ((edtpassword.getText().toString().length() < 6)) {
+
+ Snackbar.make(rootLayout, "Password should be minimum of 8 characters", Snackbar.LENGTH_SHORT).show();
+ return;
+ }
+
+ // Create new user
+
+
+ }
+ });
+
+ dialog.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+
+ dialogInterface.dismiss();
+
+ }
+ });
+
+ dialog.show();
+
+ }
+}
diff --git a/app/src/main/java/com/example/mypc/firstskool/RecyclerViewAdapter.java b/app/src/main/java/com/example/mypc/firstskool/RecyclerViewAdapter.java
new file mode 100644
index 0000000..d068e48
--- /dev/null
+++ b/app/src/main/java/com/example/mypc/firstskool/RecyclerViewAdapter.java
@@ -0,0 +1,56 @@
+package com.example.mypc.firstskool;
+
+import android.support.annotation.NonNull;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.List;
+
+public class RecyclerViewAdapter extends RecyclerView.Adapter {
+
+ private List list;
+
+ public RecyclerViewAdapter(List list){
+ this.list = list;
+ }
+
+
+ @NonNull
+ @Override
+ public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.single_course,parent,false);
+ MyViewHolder myViewHolder = new MyViewHolder(view);
+ return myViewHolder;
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
+
+ holder.album.setImageResource(R.drawable.defaultavatar);
+ holder.album_title.setText(list.get(position));
+
+ }
+
+ @Override
+ public int getItemCount() {
+ return list.size();
+ }
+
+ public static class MyViewHolder extends RecyclerView.ViewHolder{
+
+ ImageView album;
+ TextView album_title;
+
+ public MyViewHolder(View itemView) {
+ super(itemView);
+
+ album = itemView.findViewById(R.id.album);
+ album_title = itemView.findViewById(R.id.album_title);
+ }
+ }
+}
diff --git a/app/src/main/res/drawable/defaultavatar.png b/app/src/main/res/drawable/defaultavatar.png
new file mode 100644
index 0000000..c73008f
Binary files /dev/null and b/app/src/main/res/drawable/defaultavatar.png differ
diff --git a/app/src/main/res/drawable/ic_arrow_forward_black_24dp.xml b/app/src/main/res/drawable/ic_arrow_forward_black_24dp.xml
new file mode 100644
index 0000000..cf9e208
--- /dev/null
+++ b/app/src/main/res/drawable/ic_arrow_forward_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_code_black_24dp.xml b/app/src/main/res/drawable/ic_code_black_24dp.xml
new file mode 100644
index 0000000..6f1ccb6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_code_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_email_black_24dp.xml b/app/src/main/res/drawable/ic_email_black_24dp.xml
new file mode 100644
index 0000000..ce97ab8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_email_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/logo1.png b/app/src/main/res/drawable/logo1.png
new file mode 100644
index 0000000..dc229cc
Binary files /dev/null and b/app/src/main/res/drawable/logo1.png differ
diff --git a/app/src/main/res/layout/activity_courses.xml b/app/src/main/res/layout/activity_courses.xml
new file mode 100644
index 0000000..2e47657
--- /dev/null
+++ b/app/src/main/res/layout/activity_courses.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 0000000..e393e8f
--- /dev/null
+++ b/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/login_layout.xml b/app/src/main/res/layout/login_layout.xml
new file mode 100644
index 0000000..e47f604
--- /dev/null
+++ b/app/src/main/res/layout/login_layout.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/register_layout.xml b/app/src/main/res/layout/register_layout.xml
new file mode 100644
index 0000000..9c5d246
--- /dev/null
+++ b/app/src/main/res/layout/register_layout.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/single_course.xml b/app/src/main/res/layout/single_course.xml
new file mode 100644
index 0000000..640b805
--- /dev/null
+++ b/app/src/main/res/layout/single_course.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b6bf4b1..1201606 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,29 @@
FirstSkool
+
+
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
+ - 7
+ - 8
+ - 9
+ - 10
+ - 11
+ - 12
+
+
+
+
+ - UPSC
+ - CAT
+ - GRE
+ - IIT
+ - AIEEE
+ - NEET
+
+