forked from samiurprapon/Aether
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from SharifRafid/master
Android: Student UI Implementation
- Loading branch information
Showing
39 changed files
with
1,471 additions
and
3 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
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
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
36 changes: 36 additions & 0 deletions
36
android/app/src/main/java/life/nsu/aether/utils/adapters/HomePageFragmentSliderAdapter.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,36 @@ | ||
/* | ||
* HomePageFragmentSliderAdapter Created by Samiur Prapon | ||
* Last modified 24/7/21, 3:02 pm | ||
* Copyright (c) 2021. All rights reserved. | ||
* | ||
*/ | ||
|
||
package life.nsu.aether.utils.adapters; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.fragment.app.Fragment; | ||
import androidx.fragment.app.FragmentManager; | ||
import androidx.fragment.app.FragmentStatePagerAdapter; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class HomePageFragmentSliderAdapter extends FragmentStatePagerAdapter { | ||
|
||
ArrayList<Fragment> fragments; | ||
|
||
public HomePageFragmentSliderAdapter(ArrayList<Fragment> fragments, FragmentManager fm, int behavior) { | ||
super(fm, behavior); | ||
this.fragments = fragments; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Fragment getItem(int position) { | ||
return fragments.get(position); | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return fragments.size(); | ||
} | ||
} |
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
73 changes: 73 additions & 0 deletions
73
android/app/src/main/java/life/nsu/aether/views/fragments/ClassesFragment.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,73 @@ | ||
/* | ||
* ClassesFragment Created by Samiur Prapon | ||
* Last modified 17/7/21, 11:12 am | ||
* Copyright (c) 2021. All rights reserved. | ||
* | ||
*/ | ||
|
||
package life.nsu.aether.views.fragments; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import life.nsu.aether.R; | ||
|
||
/** | ||
* A simple {@link Fragment} subclass. | ||
* Use the {@link ClassesFragment#newInstance} factory method to | ||
* create an instance of this fragment. | ||
*/ | ||
public class ClassesFragment extends Fragment { | ||
|
||
// TODO: Rename parameter arguments, choose names that match | ||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | ||
private static final String ARG_PARAM1 = "param1"; | ||
private static final String ARG_PARAM2 = "param2"; | ||
|
||
// TODO: Rename and change types of parameters | ||
private String mParam1; | ||
private String mParam2; | ||
|
||
public ClassesFragment() { | ||
// Required empty public constructor | ||
} | ||
|
||
/** | ||
* Use this factory method to create a new instance of | ||
* this fragment using the provided parameters. | ||
* | ||
* @param param1 Parameter 1. | ||
* @param param2 Parameter 2. | ||
* @return A new instance of fragment ClassesFragment. | ||
*/ | ||
// TODO: Rename and change types and number of parameters | ||
public static ClassesFragment newInstance(String param1, String param2) { | ||
ClassesFragment fragment = new ClassesFragment(); | ||
Bundle args = new Bundle(); | ||
args.putString(ARG_PARAM1, param1); | ||
args.putString(ARG_PARAM2, param2); | ||
fragment.setArguments(args); | ||
return fragment; | ||
} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (getArguments() != null) { | ||
mParam1 = getArguments().getString(ARG_PARAM1); | ||
mParam2 = getArguments().getString(ARG_PARAM2); | ||
} | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
return inflater.inflate(R.layout.fragment_classes, container, false); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
android/app/src/main/java/life/nsu/aether/views/fragments/CoursesFragment.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,73 @@ | ||
/* | ||
* CoursesFragment Created by Samiur Prapon | ||
* Last modified 17/7/21, 11:12 am | ||
* Copyright (c) 2021. All rights reserved. | ||
* | ||
*/ | ||
|
||
package life.nsu.aether.views.fragments; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import life.nsu.aether.R; | ||
|
||
/** | ||
* A simple {@link Fragment} subclass. | ||
* Use the {@link CoursesFragment#newInstance} factory method to | ||
* create an instance of this fragment. | ||
*/ | ||
public class CoursesFragment extends Fragment { | ||
|
||
// TODO: Rename parameter arguments, choose names that match | ||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | ||
private static final String ARG_PARAM1 = "param1"; | ||
private static final String ARG_PARAM2 = "param2"; | ||
|
||
// TODO: Rename and change types of parameters | ||
private String mParam1; | ||
private String mParam2; | ||
|
||
public CoursesFragment() { | ||
// Required empty public constructor | ||
} | ||
|
||
/** | ||
* Use this factory method to create a new instance of | ||
* this fragment using the provided parameters. | ||
* | ||
* @param param1 Parameter 1. | ||
* @param param2 Parameter 2. | ||
* @return A new instance of fragment CoursesFragment. | ||
*/ | ||
// TODO: Rename and change types and number of parameters | ||
public static CoursesFragment newInstance(String param1, String param2) { | ||
CoursesFragment fragment = new CoursesFragment(); | ||
Bundle args = new Bundle(); | ||
args.putString(ARG_PARAM1, param1); | ||
args.putString(ARG_PARAM2, param2); | ||
fragment.setArguments(args); | ||
return fragment; | ||
} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (getArguments() != null) { | ||
mParam1 = getArguments().getString(ARG_PARAM1); | ||
mParam2 = getArguments().getString(ARG_PARAM2); | ||
} | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
return inflater.inflate(R.layout.fragment_courses, container, false); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
android/app/src/main/java/life/nsu/aether/views/fragments/ExamFragment.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,73 @@ | ||
/* | ||
* ExamFragment Created by Samiur Prapon | ||
* Last modified 17/7/21, 11:12 am | ||
* Copyright (c) 2021. All rights reserved. | ||
* | ||
*/ | ||
|
||
package life.nsu.aether.views.fragments; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import life.nsu.aether.R; | ||
|
||
/** | ||
* A simple {@link Fragment} subclass. | ||
* Use the {@link ExamFragment#newInstance} factory method to | ||
* create an instance of this fragment. | ||
*/ | ||
public class ExamFragment extends Fragment { | ||
|
||
// TODO: Rename parameter arguments, choose names that match | ||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | ||
private static final String ARG_PARAM1 = "param1"; | ||
private static final String ARG_PARAM2 = "param2"; | ||
|
||
// TODO: Rename and change types of parameters | ||
private String mParam1; | ||
private String mParam2; | ||
|
||
public ExamFragment() { | ||
// Required empty public constructor | ||
} | ||
|
||
/** | ||
* Use this factory method to create a new instance of | ||
* this fragment using the provided parameters. | ||
* | ||
* @param param1 Parameter 1. | ||
* @param param2 Parameter 2. | ||
* @return A new instance of fragment ExamFragment. | ||
*/ | ||
// TODO: Rename and change types and number of parameters | ||
public static ExamFragment newInstance(String param1, String param2) { | ||
ExamFragment fragment = new ExamFragment(); | ||
Bundle args = new Bundle(); | ||
args.putString(ARG_PARAM1, param1); | ||
args.putString(ARG_PARAM2, param2); | ||
fragment.setArguments(args); | ||
return fragment; | ||
} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (getArguments() != null) { | ||
mParam1 = getArguments().getString(ARG_PARAM1); | ||
mParam2 = getArguments().getString(ARG_PARAM2); | ||
} | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
return inflater.inflate(R.layout.fragment_exam, container, false); | ||
} | ||
} |
Oops, something went wrong.