Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dyslexia Font Selector #10

Merged
merged 8 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fixed custom font text styling
  • Loading branch information
Dragnalio committed Dec 3, 2020
commit cc44aacca4af7507a628b3e5b0a2c8e6e4f51a75
12 changes: 6 additions & 6 deletions app/src/main/java/com/ambinusian/adab/all/ActivityLive.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
className.setTypeface(textTypeface);
classSession.setTypeface(textTypeface);
textContent.setTypeface(textTypeface);
textLiveNow.setTypeface(textTypeface);
courseTitle.setTypeface(textTypeface);
toolbarTitle.setTypeface(textTypeface);
className.setTypeface(textTypeface, className.getTypeface().getStyle());
classSession.setTypeface(textTypeface, classSession.getTypeface().getStyle());
textContent.setTypeface(textTypeface, textContent.getTypeface().getStyle());
textLiveNow.setTypeface(textTypeface, textLiveNow.getTypeface().getStyle());
courseTitle.setTypeface(textTypeface, courseTitle.getTypeface().getStyle());
toolbarTitle.setTypeface(textTypeface, toolbarTitle.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ private void setTextTypeface(ClasslListHolder holder){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
holder.classTopic.setTypeface(textTypeface);
holder.meeting.setTypeface(textTypeface);
holder.time.setTypeface(textTypeface);
holder.classTopic.setTypeface(textTypeface, holder.classTopic.getTypeface().getStyle());
holder.meeting.setTypeface(textTypeface, holder.meeting.getTypeface().getStyle());
holder.time.setTypeface(textTypeface, holder.time.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ private void setTextTypeface(CourseHolder holder){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
holder.classTime.setTypeface(textTypeface);
holder.classTitle.setTypeface(textTypeface);
holder.courses.setTypeface(textTypeface);
holder.classMeeting.setTypeface(textTypeface);
holder.courseCode.setTypeface(textTypeface);
holder.classCode.setTypeface(textTypeface);
holder.classType.setTypeface(textTypeface);
holder.classTime.setTypeface(textTypeface, holder.classTime.getTypeface().getStyle());
holder.classTitle.setTypeface(textTypeface, holder.classTitle.getTypeface().getStyle());
holder.courses.setTypeface(textTypeface, holder.courses.getTypeface().getStyle());
holder.classMeeting.setTypeface(textTypeface, holder.classMeeting.getTypeface().getStyle());
holder.courseCode.setTypeface(textTypeface, holder.courseCode.getTypeface().getStyle());
holder.classCode.setTypeface(textTypeface, holder.classCode.getTypeface().getStyle());
holder.classType.setTypeface(textTypeface, holder.classType.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ private void setTextTypeface(ScheduleHolder holder){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
holder.scheduleClassType.setTypeface(textTypeface);
holder.scheduleClassTitle.setTypeface(textTypeface);
holder.scheduleCourse.setTypeface(textTypeface);
holder.scheduleCourseCode.setTypeface(textTypeface);
holder.scheduleClassCode.setTypeface(textTypeface);
holder.scheduleClassTime.setTypeface(textTypeface);
holder.scheduleClassType.setTypeface(textTypeface, holder.scheduleClassType.getTypeface().getStyle());
holder.scheduleClassTitle.setTypeface(textTypeface, holder.scheduleClassTitle.getTypeface().getStyle());
holder.scheduleCourse.setTypeface(textTypeface, holder.scheduleCourse.getTypeface().getStyle());
holder.scheduleCourseCode.setTypeface(textTypeface, holder.scheduleCourseCode.getTypeface().getStyle());
holder.scheduleClassCode.setTypeface(textTypeface, holder.scheduleClassCode.getTypeface().getStyle());
holder.scheduleClassTime.setTypeface(textTypeface, holder.scheduleClassTime.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private void setTextSize(float textSize){
}

private void setTextTypeface(Typeface textTypeface){
tvTitleExample.setTypeface(textTypeface);
tvSubtitleExample.setTypeface(textTypeface);
tvTitleExample.setTypeface(textTypeface, tvTitleExample.getTypeface().getStyle());
tvSubtitleExample.setTypeface(textTypeface, tvSubtitleExample.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
loginMessage.setTypeface(textTypeface);
inputNim.setTypeface(textTypeface);
inputPassword.setTypeface(textTypeface);
btnLogin.setTypeface(textTypeface);
loginMessage.setTypeface(textTypeface, loginMessage.getTypeface().getStyle());
inputNim.setTypeface(textTypeface, inputNim.getTypeface().getStyle());
inputPassword.setTypeface(textTypeface, inputPassword.getTypeface().getStyle());
btnLogin.setTypeface(textTypeface, btnLogin.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
tvHiThere.setTypeface(textTypeface);
letsgo.setTypeface(textTypeface);
tvHiThere.setTypeface(textTypeface, tvHiThere.getTypeface().getStyle());
letsgo.setTypeface(textTypeface, letsgo.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
selectedDate.setTypeface(textTypeface);
noClass.setTypeface(textTypeface);
selectedDate.setTypeface(textTypeface, selectedDate.getTypeface().getStyle());
noClass.setTypeface(textTypeface, noClass.getTypeface().getStyle());
}
}
32 changes: 16 additions & 16 deletions app/src/main/java/com/ambinusian/adab/ui/student/FragmentHome.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,21 +283,21 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
welcomeTitle.setTypeface(textTypeface);
welcomeSubtitle.setTypeface(textTypeface);
ongoingClass.headlineTitle.setTypeface(textTypeface);
liveClassTitle.setTypeface(textTypeface);
liveCourse.setTypeface(textTypeface);
liveClassMeeting.setTypeface(textTypeface);
nextClassTime.setTypeface(textTypeface);
nextClassTitle.setTypeface(textTypeface);
nextCourse.setTypeface(textTypeface);
nextClassSession.setTypeface(textTypeface);
nextClass.sectionTitle.setTypeface(textTypeface);
nextClass.sectionSubtitle.setTypeface(textTypeface);
latestClass.sectionTitle.setTypeface(textTypeface);
latestClass.sectionSubtitle.setTypeface(textTypeface);
seeAllLatestClass.setTypeface(textTypeface);
seeAllNextClass.setTypeface(textTypeface);
welcomeTitle.setTypeface(textTypeface, welcomeTitle.getTypeface().getStyle());
welcomeSubtitle.setTypeface(textTypeface, welcomeSubtitle.getTypeface().getStyle());
ongoingClass.headlineTitle.setTypeface(textTypeface, ongoingClass.headlineTitle.getTypeface().getStyle());
liveClassTitle.setTypeface(textTypeface, liveClassTitle.getTypeface().getStyle());
liveCourse.setTypeface(textTypeface, liveCourse.getTypeface().getStyle());
liveClassMeeting.setTypeface(textTypeface, liveClassMeeting.getTypeface().getStyle());
nextClassTime.setTypeface(textTypeface, nextClassTime.getTypeface().getStyle());
nextClassTitle.setTypeface(textTypeface, nextClassTitle.getTypeface().getStyle());
nextCourse.setTypeface(textTypeface, nextCourse.getTypeface().getStyle());
nextClassSession.setTypeface(textTypeface, nextClassSession.getTypeface().getStyle());
nextClass.sectionTitle.setTypeface(textTypeface, nextClass.sectionTitle.getTypeface().getStyle());
nextClass.sectionSubtitle.setTypeface(textTypeface, nextClass.sectionSubtitle.getTypeface().getStyle());
latestClass.sectionTitle.setTypeface(textTypeface, latestClass.sectionTitle.getTypeface().getStyle());
latestClass.sectionSubtitle.setTypeface(textTypeface, latestClass.sectionSubtitle.getTypeface().getStyle());
seeAllLatestClass.setTypeface(textTypeface, seeAllLatestClass.getTypeface().getStyle());
seeAllNextClass.setTypeface(textTypeface, seeAllNextClass.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
course.setTypeface(textTypeface);
courseCode.setTypeface(textTypeface);
classRoom.setTypeface(textTypeface);
nextClassTitle.setTypeface(textTypeface);
nextClassSession.setTypeface(textTypeface);
nextClassTime.setTypeface(textTypeface);
svClassList.sectionTitle.setTypeface(textTypeface);
svClassList.sectionSubtitle.setTypeface(textTypeface);
course.setTypeface(textTypeface, course.getTypeface().getStyle());
courseCode.setTypeface(textTypeface, courseCode.getTypeface().getStyle());
classRoom.setTypeface(textTypeface, classRoom.getTypeface().getStyle());
nextClassTitle.setTypeface(textTypeface, nextClassTitle.getTypeface().getStyle());
nextClassSession.setTypeface(textTypeface, nextClassSession.getTypeface().getStyle());
nextClassTime.setTypeface(textTypeface, nextClassTime.getTypeface().getStyle());
svClassList.sectionTitle.setTypeface(textTypeface, svClassList.sectionTitle.getTypeface().getStyle());
svClassList.sectionSubtitle.setTypeface(textTypeface, svClassList.sectionSubtitle.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
latestClass.setTypeface(textTypeface);
latestClass.setTypeface(textTypeface, latestClass.getTypeface().getStyle());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
binusAdab.setTypeface(textTypeface);
version.setTypeface(textTypeface);
binusAdab.setTypeface(textTypeface, binusAdab.getTypeface().getStyle());
version.setTypeface(textTypeface, version.getTypeface().getStyle());
}

private class SpinnerAdapter extends ArrayAdapter<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ private void setTextTypeface(){
//get font type
Typeface textTypeface = userPreferences.getTextTypeface();
//set font type for each text view
textUserName.setTypeface(textTypeface);
textUserDepartment.setTypeface(textTypeface);
buttonAccountDetails.setTypeface(textTypeface);
textMessage.setTypeface(textTypeface);
textAccessibilityMode.setTypeface(textTypeface);
textSignOut.setTypeface(textTypeface);
textUserName.setTypeface(textTypeface, textUserName.getTypeface().getStyle());
textUserDepartment.setTypeface(textTypeface, textUserDepartment.getTypeface().getStyle());
buttonAccountDetails.setTypeface(textTypeface, buttonAccountDetails.getTypeface().getStyle());
textMessage.setTypeface(textTypeface, textMessage.getTypeface().getStyle());
textAccessibilityMode.setTypeface(textTypeface, textAccessibilityMode.getTypeface().getStyle());
textSignOut.setTypeface(textTypeface, textSignOut.getTypeface().getStyle());
}
}
4 changes: 2 additions & 2 deletions app/version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Thu Dec 03 18:51:19 ICT 2020
#Thu Dec 03 19:24:46 ICT 2020
VERSION_NAME=1.0.1
VERSION_CODE=324
VERSION_CODE=327