Skip to content

Commit

Permalink
courses: better course step display (fixes #2771) (#2782)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Dec 4, 2023
1 parent e7cdac8 commit 7318f53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1178
versionName "0.11.78"
versionCode 1179
versionName "0.11.79"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
fragmentCourseStepBinding.description.setMovementMethod(LinkMovementMethod.getInstance());

if (!RealmMyCourse.isMyCourse(user.getId(), step.getCourseId(), mRealm)) {
fragmentCourseStepBinding.btnTakeTest.setVisibility(View.INVISIBLE);
fragmentCourseStepBinding.btnTakeTest.setVisibility(View.GONE);
}
setListeners();

Expand All @@ -164,7 +164,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
}

private void hideTestIfNoQuestion() {
fragmentCourseStepBinding.btnTakeTest.setVisibility(View.INVISIBLE);
fragmentCourseStepBinding.btnTakeTest.setVisibility(View.GONE);
if (stepExams != null && stepExams.size() > 0) {
String first_step_id = stepExams.get(0).getId();
RealmResults<RealmExamQuestion> questions = mRealm.where(RealmExamQuestion.class).equalTo("examId", first_step_id).findAll();
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/fragment_course_step.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginEnd="@dimen/_10dp"
android:gravity="right">

<Button
Expand Down Expand Up @@ -58,7 +59,9 @@
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_10dp"
android:layout_marginEnd="@dimen/_10dp" />
</LinearLayout>
</LinearLayout>

Expand Down

0 comments on commit 7318f53

Please sign in to comment.