@@ -41,6 +41,7 @@ public String getLoc(){
return loc;
}
public String getStart(){
if (start==-1) return "N/A";
String mins = "00";
if (start%2==1){
mins="30";
@@ -50,6 +51,7 @@ public String getStart(){
return startStr;
}
public String getEnd(){
if (end==-1) return "N/A";
String mins = "00";
if (end%2==1){
mins="30";
@@ -3,6 +3,7 @@

import android.app.Dialog;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
@@ -20,11 +21,13 @@
import android.widget.ListView;
import android.widget.TextView;

import com.example.kamarol.infoten_v1.ExaminationResultTestUI;
import com.example.kamarol.infoten_v1.Functions.ExaminationTableParser;
import com.example.kamarol.infoten_v1.LoaderChecker;
import com.example.kamarol.infoten_v1.LoginFragment;
import com.example.kamarol.infoten_v1.MenuFragments.Examination.ExamTablesFragment;
import com.example.kamarol.infoten_v1.MenuFragments.Examination.ExaminationData;
import com.example.kamarol.infoten_v1.MenuFragments.Timetable.SubjectDetailsFragment;
import com.example.kamarol.infoten_v1.R;

import org.jsoup.Jsoup;
@@ -71,7 +74,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

@Override
public void onClick(View v) {
dialog.show();//todo kamarol
ExaminationResultTestUI fragment = new ExaminationResultTestUI();
fragment.show(getFragmentManager(), "Subject details");
}
});
listView = view.findViewById(R.id.examtableslistview);
@@ -120,8 +124,8 @@ public void onLoad(String html) {
if (endMins == 30) endMins = 1;
end = endHrs + endMins;
} else {
start = 0;
end = 0;
start = -1;
end = -1;
date = "";
}
examinationDataArrayList.add(new ExaminationData(code, name, date, section, seat, loc, start, end, 0));
@@ -154,7 +158,7 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup

code.setText(examinationDataArrayList.get(position).getCode());
name.setText(examinationDataArrayList.get(position).getName());
date.setText(examinationDataArrayList.get(position).getDate());
date.setText("("+examinationDataArrayList.get(position).getDate()+")");
section.setText(examinationDataArrayList.get(position).getSection());
seat.setText(examinationDataArrayList.get(position).getSeat());
loc.setText(examinationDataArrayList.get(position).getLoc());
@@ -1,5 +1,7 @@
package com.example.kamarol.infoten_v1;

import android.support.annotation.NonNull;

import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -8,7 +10,7 @@
* Created by kamarol on 12/12/2017.
*/

class SubjectResult {
class SubjectResult implements Comparable<SubjectResult>{
private String subjectCode;
private String result;
private double creditHour;
@@ -86,4 +88,21 @@ public Integer getAcademicYear() {
}


@Override
public int compareTo(SubjectResult s) {
if (this.getAcademicYear() > s.getAcademicYear()) {
return 1;
} else if (this.getAcademicYear() < s.getAcademicYear()) {
return -1;
} else {
if (this.getSemester() > s.getSemester()) {
return 1;
} else if (this.getSemester() < s.getSemester()) {
return -1;
}
else {
return 0;
}
}
}
}
@@ -11,37 +11,32 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:textSize="17sp"
android:textStyle="bold"
android:id="@+id/examname"
android:text="Software Quality"
android:text="Mobile Application Development"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text=" "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textSize="11sp"
android:text="("
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textStyle="bold"
android:textSize="11sp"
android:id="@+id/examcode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CSEB453" />
<TextView
android:textSize="11sp"
android:text=")"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textStyle="bold"
android:layout_weight="1"
android:textAlignment="textEnd"
android:textSize="15sp"
android:id="@+id/examdate"
android:text="23/01/2018 "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</LinearLayout>
<View
@@ -66,6 +61,16 @@
android:text="12:00:00"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text=" "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textStyle="bold"
android:id="@+id/examdate"
android:text="23/01/2018"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_weight="1"
android:textAlignment="textEnd"