├── .idea
├── .name
├── copyright
│ └── profiles_settings.xml
├── vcs.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
└── misc.xml
├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── first.png
│ │ │ │ ├── last.png
│ │ │ │ ├── resized.png
│ │ │ │ ├── drop_down_spinner_background.xml
│ │ │ │ └── drop_down_spinner_selector.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ ├── class_section_spinner_layout.xml
│ │ │ │ └── activity_main.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── hourglass
│ │ │ │ └── lingaraj
│ │ │ │ └── marksheet
│ │ │ │ ├── serializableClassStudentList
│ │ │ │ ├── StudentDetail.java
│ │ │ │ └── StudentList.java
│ │ │ │ ├── VolleyClassHandleHttprequest.java
│ │ │ │ ├── InternetConnectionDetector.java
│ │ │ │ └── MainActivity.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── hourglass
│ │ │ └── lingaraj
│ │ │ └── marksheet
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── hourglass
│ │ └── lingaraj
│ │ └── marksheet
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── gradlew.bat
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | Marksheet
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/drawable/first.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/last.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/drawable/last.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/resized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/drawable/resized.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lingarajsankaravelu/Marksheet/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 21 11:34:03 PDT 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drop_down_spinner_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drop_down_spinner_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hourglass/lingaraj/marksheet/serializableClassStudentList/StudentDetail.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet.serializableClassStudentList;
2 |
3 | /**
4 | * Created by lingaraj on 1/30/16.
5 | */
6 |
7 | public class StudentDetail {
8 | public String name;
9 | public String rollno;
10 | public String scoredMarks="";
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hourglass/lingaraj/marksheet/serializableClassStudentList/StudentList.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet.serializableClassStudentList;
2 |
3 | import java.io.Serializable;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by lingaraj on 1/30/16.
8 | */
9 | public class StudentList implements Serializable
10 | {
11 | public List studentDetails;
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/test/java/com/hourglass/lingaraj/marksheet/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/hourglass/lingaraj/marksheet/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/class_section_spinner_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/lingaraj/Library/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 | #}
18 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.hourglass.lingaraj.marksheet"
9 | minSdkVersion 21
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
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 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:23.1.1'
26 | compile 'com.android.support:design:23.1.1'
27 | compile 'com.mcxiaoke.volley:library:1.0.19'
28 | compile 'com.google.code.gson:gson:2.5'
29 | }
30 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/app/src/main/java/com/hourglass/lingaraj/marksheet/VolleyClassHandleHttprequest.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet;
2 |
3 | import android.app.Application;
4 |
5 | import com.android.volley.RequestQueue;
6 | import com.android.volley.toolbox.Volley;
7 |
8 | /**
9 | * Created by lingaraj on 8/20/15.
10 | */
11 | public class VolleyClassHandleHttprequest extends Application {
12 |
13 | private static VolleyClassHandleHttprequest sInstance;
14 |
15 | private RequestQueue mRequestQueue;
16 |
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 |
21 | mRequestQueue = Volley.newRequestQueue(this);
22 |
23 | sInstance = this;
24 | }
25 |
26 | public synchronized static VolleyClassHandleHttprequest getInstance() {
27 |
28 | return sInstance;
29 | }
30 |
31 | public RequestQueue getRequestQueue() {
32 |
33 | return mRequestQueue;
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hourglass/lingaraj/marksheet/InternetConnectionDetector.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | /**
8 | * Created by lingaraj on 1/12/16.
9 | */
10 | public class InternetConnectionDetector
11 | {
12 | /**
13 | * Calling ths isConnectingToInternet from any class or Adapter will give the internet connectivity status of the Device(i.e connected or disconnected)
14 | */
15 |
16 | private Context tcontext;
17 |
18 | public InternetConnectionDetector(Context context){
19 | this.tcontext = context;
20 | }
21 |
22 | public boolean isConnectingToInternet(){
23 | ConnectivityManager connectivity = (ConnectivityManager) tcontext.getSystemService(Context.CONNECTIVITY_SERVICE);
24 | if (connectivity != null)
25 | {
26 | NetworkInfo[] info = connectivity.getAllNetworkInfo();
27 | if (info != null)
28 | for (int i = 0; i < info.length; i++)
29 | if (info[i].getState() == NetworkInfo.State.CONNECTED)
30 | {
31 | return true;
32 | }
33 |
34 | }
35 | return false;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Marksheet
3 |
4 |
5 | - class
6 | - Pre KG
7 | - LKG
8 | - UKG
9 | - I
10 | - II
11 | - III
12 | - IV
13 | - V
14 | - VI
15 | - VII
16 | - VIII
17 | - IX
18 | - X
19 | - XI
20 | - XII
21 | - All
22 |
23 |
24 | - section
25 | - A
26 | - B
27 | - C
28 | - D
29 |
30 |
31 | - exam type
32 | - Term 1
33 | - Term 2
34 | - Term 3
35 | - Term 4
36 | - Term 5
37 | - Term 6
38 | - Term 7
39 | - Term 8
40 | - Quartely Exam
41 | - Halfearly
42 | - Annual Exam
43 |
44 |
45 | - Grade system
46 | - Grade
47 | - Marks
48 | - Percentage
49 |
50 |
51 | - marks
52 | - 25
53 | - 40
54 | - 50
55 | - 75
56 | - 100
57 | - 150
58 | - 200
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | Android Lint
39 |
40 |
41 | Java
42 |
43 |
44 | Packaging issuesJava
45 |
46 |
47 | Probable bugsJava
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | Android API 21 Platform (1)
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
20 |
21 |
32 |
33 |
43 |
44 |
45 |
56 |
57 |
58 |
69 |
70 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
98 |
102 |
113 |
126 |
139 |
151 |
163 |
175 |
176 |
177 |
178 |
183 |
199 |
214 |
215 |
216 |
233 |
250 |
251 |
268 |
286 |
287 |
297 |
298 |
312 |
313 |
322 |
323 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hourglass/lingaraj/marksheet/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hourglass.lingaraj.marksheet;
2 |
3 | import android.app.DownloadManager;
4 | import android.app.ProgressDialog;
5 | import android.media.Image;
6 | import android.support.design.widget.Snackbar;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.os.Bundle;
9 | import android.util.Log;
10 | import android.view.View;
11 | import android.widget.AdapterView;
12 | import android.widget.ArrayAdapter;
13 | import android.widget.AutoCompleteTextView;
14 | import android.widget.Button;
15 | import android.widget.ImageView;
16 | import android.widget.RelativeLayout;
17 | import android.widget.Spinner;
18 | import android.widget.TextView;
19 | import android.widget.Toast;
20 |
21 | import com.android.volley.Request;
22 | import com.android.volley.Response;
23 | import com.android.volley.VolleyError;
24 | import com.android.volley.toolbox.JsonArrayRequest;
25 | import com.android.volley.toolbox.JsonObjectRequest;
26 | import com.google.gson.Gson;
27 | import com.google.gson.reflect.TypeToken;
28 | import com.hourglass.lingaraj.marksheet.serializableClassStudentList.StudentDetail;
29 | import com.hourglass.lingaraj.marksheet.serializableClassStudentList.StudentList;
30 |
31 | import org.json.JSONArray;
32 | import org.json.JSONObject;
33 | import org.w3c.dom.Text;
34 |
35 | import java.lang.reflect.Type;
36 | import java.util.ArrayList;
37 | import java.util.List;
38 |
39 | public class MainActivity extends AppCompatActivity {
40 | Button skip, submit;
41 | Spinner className, section, examname, gradeSystem, markslistSpinner;
42 | TextView displayName, displayRollNo,classSelectedTextview,sectionSelectedTextview,examSelectedTextview;
43 | android.support.v7.widget.AppCompatAutoCompleteTextView enteredMarkAutoCompleteTextview;
44 | ArrayAdapter classSpinnerAdapter, sectionSpinnerAdapter, gradeSystemSpinnerAdapter, examNameSpinnerAdapter, markListSpinnerAdapter;
45 | String classItemSelected, sectionItemSelected,examNameSelected,gradeNameSelected,marksSelected;
46 | RelativeLayout parentRelativeLayout;
47 | InternetConnectionDetector internetConnectionDetector;
48 | boolean isInternetConnected;
49 | ProgressDialog markSheetProgressDialog;
50 | StudentList studentList;
51 | int initialIndex;
52 | int totalStudent;
53 | String enteredmark;
54 | ImageView nextStudent, previousStudent;
55 |
56 |
57 | @Override
58 | protected void onCreate(Bundle savedInstanceState) {
59 | super.onCreate(savedInstanceState);
60 | setContentView(R.layout.activity_main);
61 | studentList = new StudentList();
62 | classSelectedTextview = (TextView) findViewById(R.id.class_selected);
63 | examSelectedTextview =(TextView) findViewById(R.id.exam_type);
64 | sectionSelectedTextview = (TextView) findViewById(R.id.section_selected);
65 | skip = (Button) findViewById(R.id.skip_button);
66 | nextStudent = (ImageView) findViewById(R.id.next_student);
67 | previousStudent = (ImageView) findViewById(R.id.previous_student);
68 | enteredMarkAutoCompleteTextview = (android.support.v7.widget.AppCompatAutoCompleteTextView) findViewById(R.id.auto_completeTextview_mark);
69 | className = (Spinner) findViewById(R.id.class_name);
70 | section = (Spinner) findViewById(R.id.section);
71 | examname = (Spinner) findViewById(R.id.exam_name);
72 | gradeSystem = (Spinner) findViewById(R.id.grade_system);
73 | markslistSpinner = (Spinner) findViewById(R.id.marks_list);
74 |
75 | displayName = (TextView) findViewById(R.id.display_name_textview);
76 | displayRollNo = (TextView) findViewById(R.id.display_rollno_textview);
77 | submit = (Button) findViewById(R.id.submit);
78 | parentRelativeLayout = (RelativeLayout) findViewById(R.id.parent_relative_layout_marksheet);
79 | internetConnectionDetector = new InternetConnectionDetector(MainActivity.this);
80 | markSheetProgressDialog = new ProgressDialog(MainActivity.this);
81 | setSpinnerDataClassAndSection();
82 |
83 | nextStudent.setOnClickListener(new View.OnClickListener() {
84 | @Override
85 | public void onClick(View v) {
86 |
87 | if (enteredMarkAutoCompleteTextview.getText().toString().isEmpty()) {
88 | Snackbar.make(parentRelativeLayout, "You can't move to next student without giving mark/ if absent press skip", Snackbar.LENGTH_SHORT).show();
89 | } else {
90 | studentList.studentDetails.get(initialIndex).scoredMarks = enteredMarkAutoCompleteTextview.getText().toString();
91 | enteredMarkAutoCompleteTextview.setText("");
92 | if (previousStudent.getVisibility() == View.INVISIBLE || previousStudent.getVisibility() == View.GONE) {
93 | previousStudent.setVisibility(View.VISIBLE);
94 | }
95 | if (initialIndex + 1 == totalStudent - 1) {
96 | nextStudent.setVisibility(View.GONE);
97 | submit.setVisibility(View.VISIBLE);
98 | }
99 |
100 | loadNextStudent();
101 |
102 | }
103 | }
104 | });
105 | previousStudent.setOnClickListener(new View.OnClickListener() {
106 | @Override
107 | public void onClick(View v) {
108 | if (enteredMarkAutoCompleteTextview.getText().toString().isEmpty()) {
109 | Snackbar.make(parentRelativeLayout, "You can't move to previous student without giving marks for the current one,if absent press skip", Snackbar.LENGTH_SHORT).show();
110 | } else {
111 | if (initialIndex - 1 == 0) {
112 | previousStudent.setVisibility(View.INVISIBLE);
113 | }
114 | studentList.studentDetails.get(initialIndex).scoredMarks = enteredMarkAutoCompleteTextview.getText().toString();
115 | enteredMarkAutoCompleteTextview.setText("");
116 | enteredMarkAutoCompleteTextview.clearFocus();
117 | loadPreviousStudent();
118 |
119 |
120 | }
121 |
122 | }
123 | });
124 |
125 |
126 | submit.setOnClickListener(new View.OnClickListener() {
127 | @Override
128 | public void onClick(View v) {
129 |
130 | //Todo check autoCompleteTextview for null
131 | //Todo store data to serializable class, display progress dialog and add data to server.
132 | if (enteredMarkAutoCompleteTextview.getText().toString().isEmpty()) {
133 | Snackbar.make(parentRelativeLayout, "You can't move to previous student without giving marks for the current one,if absent press skip", Snackbar.LENGTH_SHORT).show();
134 | } else {
135 | studentList.studentDetails.get(initialIndex).scoredMarks = enteredMarkAutoCompleteTextview.getText().toString();
136 | submitAssessmentDataBackToServer();
137 |
138 | }
139 | }
140 | });
141 | skip.setOnClickListener(new View.OnClickListener() {
142 | @Override
143 | public void onClick(View v) {
144 | enteredMarkAutoCompleteTextview.setText("absent");
145 |
146 |
147 | }
148 | });
149 |
150 |
151 | className.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
152 | @Override
153 | public void onItemSelected(AdapterView> parent, View view, int position, long id) {
154 | classItemSelected = parent.getItemAtPosition(position).toString();
155 | if(classItemSelected.equals("class"))
156 | {
157 |
158 | }
159 | else
160 | {
161 | classSelectedTextview.setText(classItemSelected);
162 | }
163 | /* if(classItemSelected.equals("class"))
164 | {
165 | section.setVisibility(View.INVISIBLE);
166 | }
167 | else
168 | {
169 | section.setVisibility(View.VISIBLE);
170 | }*/
171 | loadStudentDataForAssessment();
172 |
173 |
174 | }
175 |
176 | @Override
177 | public void onNothingSelected(AdapterView> parent) {
178 |
179 | }
180 | });
181 |
182 | section.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
183 | @Override
184 | public void onItemSelected(AdapterView> parent, View view, int position, long id) {
185 | sectionItemSelected = parent.getItemAtPosition(position).toString();
186 | if(sectionItemSelected.equals("section"))
187 | {
188 |
189 | }
190 | else
191 | {
192 | sectionSelectedTextview.setText(sectionItemSelected);
193 | }
194 | loadStudentDataForAssessment();
195 |
196 | }
197 |
198 | @Override
199 | public void onNothingSelected(AdapterView> parent) {
200 |
201 | }
202 | });
203 | examname.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
204 | @Override
205 | public void onItemSelected(AdapterView> parent, View view, int position, long id) {
206 | examNameSelected = parent.getItemAtPosition(position).toString();
207 | if(examNameSelected.equals("exam type"))
208 | {
209 |
210 | }
211 | else
212 | {
213 | examSelectedTextview.setText(examNameSelected);
214 | }
215 | loadStudentDataForAssessment();
216 |
217 |
218 | }
219 |
220 | @Override
221 | public void onNothingSelected(AdapterView> parent) {
222 |
223 | }
224 | });
225 | gradeSystem.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
226 | @Override
227 | public void onItemSelected(AdapterView> parent, View view, int position, long id) {
228 | gradeNameSelected = parent.getItemAtPosition(position).toString();
229 | if(gradeNameSelected.equals("Marks"))
230 | {
231 | markslistSpinner.setVisibility(View.VISIBLE);
232 | }
233 | else
234 | {
235 | markslistSpinner.setVisibility(View.GONE);
236 | }
237 | loadStudentDataForAssessment();
238 | }
239 |
240 | @Override
241 | public void onNothingSelected(AdapterView> parent) {
242 |
243 | }
244 | });
245 |
246 |
247 |
248 | }
249 |
250 | private void submitAssessmentDataBackToServer() {
251 |
252 |
253 | markSheetProgressDialog.setMessage("Writing Data Back to Server");
254 | markSheetProgressDialog.show();
255 | String postTestUrl = "https://api.mongolab.com/api/1/databases/myfirstchoicelaundry/collections/test?apiKey=-VZcF6RVY-q-7X6TFd4PBs5x9X6y-p91";
256 | Gson gson = new Gson();
257 | String postValues = gson.toJson(studentList.studentDetails);
258 |
259 |
260 | JsonObjectRequest volleyJsonArrayPostRequest = new JsonObjectRequest(Request.Method.POST, postTestUrl, postValues, new Response.Listener() {
261 | @Override
262 | public void onResponse(JSONObject response) {
263 | try {
264 | String value;
265 | value = response.toString();
266 | Log.i("response", response.toString());
267 | Snackbar.make(parentRelativeLayout, "Data added to database Successfully", Snackbar.LENGTH_SHORT).show();
268 | studentList.studentDetails.clear();
269 | enteredMarkAutoCompleteTextview.setText("");
270 | displayName.setText("Name");
271 | displayRollNo.setText("RollNo");
272 | submit.setVisibility(View.INVISIBLE);
273 | nextStudent.setVisibility(View.VISIBLE);
274 | submit.setEnabled(false);
275 | skip.setEnabled(false);
276 | nextStudent.setEnabled(false);
277 | previousStudent.setEnabled(false);
278 | skip.setEnabled(false);
279 | markSheetProgressDialog.dismiss();
280 |
281 | } catch (Exception e) {
282 | Log.e("postError", e.toString());
283 |
284 | e.printStackTrace();
285 | }
286 | }
287 |
288 | }, new Response.ErrorListener() {
289 | @Override
290 | public void onErrorResponse(VolleyError error) {
291 |
292 | Log.e("volleyPoster", error.toString());
293 | error.printStackTrace();
294 | markSheetProgressDialog.dismiss();
295 | Snackbar.make(parentRelativeLayout, "Unsuccessfull submit", Snackbar.LENGTH_SHORT).show();
296 | }
297 | });
298 | VolleyClassHandleHttprequest.getInstance().getRequestQueue().add(volleyJsonArrayPostRequest);
299 |
300 |
301 | }
302 |
303 | private void loadPreviousStudent() {
304 | if (initialIndex - 1 >= 0) {
305 | initialIndex = initialIndex - 1;
306 | setStudentDataOnTextViews(initialIndex);
307 | if (initialIndex == 0) {
308 | Snackbar.make(parentRelativeLayout, "Currently Giving Assessment For First student", Snackbar.LENGTH_SHORT).show();
309 | }
310 | if (initialIndex == totalStudent - 2 && submit.getVisibility() == View.VISIBLE) {
311 | submit.setVisibility(View.INVISIBLE);
312 | nextStudent.setVisibility(View.VISIBLE);
313 | }
314 | }
315 |
316 | }
317 |
318 | private void loadNextStudent() {
319 | /* Check's whether total student and current Index+1 matches are not overlapping,
320 |
321 | *
322 | */
323 | if (initialIndex + 1 < totalStudent) {
324 | initialIndex = initialIndex + 1;
325 | setStudentDataOnTextViews(initialIndex);
326 |
327 | } else {
328 | Snackbar.make(parentRelativeLayout, "Providing Mark for the final student in class", Snackbar.LENGTH_SHORT).show();
329 | }
330 |
331 |
332 | }
333 |
334 | private void setStudentDataOnTextViews(int index) {
335 | displayName.setText(studentList.studentDetails.get(index).name);
336 | displayRollNo.setText(studentList.studentDetails.get(index).rollno);
337 | if (!studentList.studentDetails.get(index).scoredMarks.isEmpty()) {
338 | enteredMarkAutoCompleteTextview.setText(studentList.studentDetails.get(index).scoredMarks);
339 | } else {
340 | enteredMarkAutoCompleteTextview.setText("");
341 | }
342 |
343 | }
344 |
345 |
346 | private void loadStudentDataForAssessment() {
347 |
348 | if (classItemSelected.equals("class")) {
349 | Snackbar.make(parentRelativeLayout, "Choose Class to Proceed Further", Snackbar.LENGTH_SHORT).show();
350 | }
351 | else if (sectionItemSelected.equals("section")) {
352 | Snackbar.make(parentRelativeLayout, "Choose a Section to Proceed Further", Snackbar.LENGTH_SHORT).show();
353 |
354 | }
355 | else if (examNameSelected.equals("exam type"))
356 | {
357 | Snackbar.make(parentRelativeLayout, "Choose a exam Type to Proceed Further", Snackbar.LENGTH_SHORT).show();
358 |
359 |
360 | }
361 | else if(gradeNameSelected.equals("Grade system"))
362 | {
363 | Snackbar.make(parentRelativeLayout, "Choose a Grade System to Proceed Further", Snackbar.LENGTH_SHORT).show();
364 |
365 | }
366 | else if (classItemSelected.equals("class") && sectionItemSelected.equals("section") && examNameSelected.equals("exam type") && gradeNameSelected.equals("Grade system"))
367 | {
368 | /*
369 | *Do nothing, By default spinner will select the first item, so first item in both drop donw is select
370 | * classname and section spinner will fire onItemClickByDefault, so this function will handle it and does nothing.
371 | */
372 | }
373 | else
374 | {
375 | isInternetConnected = internetConnectionDetector.isConnectingToInternet();
376 | if (isInternetConnected) {
377 | getStudentDetailDataFromServer();
378 | markSheetProgressDialog.setMessage("Getting Student Data For Assessment");
379 | markSheetProgressDialog.show();
380 | }
381 |
382 |
383 | }
384 |
385 |
386 | }
387 |
388 | private void getStudentDetailDataFromServer() {
389 |
390 | String url = "https://demo5585860.mockable.io/marksheettest";
391 | JsonArrayRequest volleyJsonArrayRequest = new JsonArrayRequest(com.android.volley.Request.Method.GET, url, new Response.Listener() {
392 | @Override
393 | public void onResponse(JSONArray response) {
394 | try {
395 | Gson gson = new Gson();
396 | // ArrayList studentDetails = new ArrayList();
397 | Type arrayType = new TypeToken>() {
398 | }.getType();
399 | studentList.studentDetails = gson.fromJson(response.toString(), arrayType);
400 | initialIndex = 0;
401 | totalStudent = studentList.studentDetails.size();
402 | previousStudent.setVisibility(View.INVISIBLE);
403 | displayName.setText(studentList.studentDetails.get(0).name);
404 | displayRollNo.setText(studentList.studentDetails.get(0).rollno);
405 | previousStudent.setEnabled(true);
406 | skip.setEnabled(true);
407 | nextStudent.setEnabled(true);
408 | submit.setEnabled(true);
409 | skip.setEnabled(true);
410 | markSheetProgressDialog.dismiss();
411 | } catch (Exception e) {
412 | Log.e("getstudentDetailEx", e.toString());
413 | e.printStackTrace();
414 | }
415 | }
416 |
417 | }, new Response.ErrorListener() {
418 | @Override
419 | public void onErrorResponse(VolleyError error) {
420 |
421 | }
422 | });
423 | VolleyClassHandleHttprequest.getInstance().getRequestQueue().add(volleyJsonArrayRequest);
424 |
425 | }
426 |
427 |
428 | private void setSpinnerDataClassAndSection()
429 | {
430 | /* Setting Dropdown spinner value with data from String.xml string array classname, section.
431 | *
432 | */
433 | try {
434 | classSpinnerAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.classname));
435 | classSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
436 | className.setAdapter(classSpinnerAdapter);
437 | } catch (Exception e) {
438 | Log.e("classSpinnerMsheet", e.toString());
439 | e.printStackTrace();
440 | }
441 |
442 | try {
443 | sectionSpinnerAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.section));
444 | sectionSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
445 | section.setAdapter(sectionSpinnerAdapter);
446 |
447 | } catch (Exception e) {
448 | Log.e("classSpinnerMsheet", e.toString());
449 | e.printStackTrace();
450 | }
451 | try {
452 | gradeSystemSpinnerAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.Grade_system));
453 | sectionSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
454 | gradeSystem.setAdapter(gradeSystemSpinnerAdapter);
455 | } catch (Exception e) {
456 | Log.e("gradeSystemSpinnerer", e.toString());
457 | e.printStackTrace();
458 | }
459 | try {
460 | examNameSpinnerAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.exam_type));
461 | sectionSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
462 | examname.setAdapter(examNameSpinnerAdapter);
463 | } catch (Exception e) {
464 | Log.e("examNameSpinnerer", e.toString());
465 | e.printStackTrace();
466 | }
467 | try
468 | {
469 | markListSpinnerAdapter= new ArrayAdapter(MainActivity.this,android.R.layout.simple_spinner_item,getResources().getStringArray(R.array.marks_list));
470 | sectionSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
471 | markslistSpinner.setAdapter(markListSpinnerAdapter);
472 | }
473 | catch (Exception e)
474 | {
475 | Log.e("marksSpinner",e.toString());
476 | e.printStackTrace();
477 | }
478 |
479 | }
480 | }
--------------------------------------------------------------------------------