Skip to content

Commit bae47fe

Browse files
fix: Fixes according to designer feedback
1 parent e097f31 commit bae47fe

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_checked="true" android:color="@color/checked_tab_item" />
4+
<item android:state_checked="false" android:color="@color/unchecked_tab_item" />
5+
</selector>

app/src/main/res/layout/fragment_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
app:layout_constraintStart_toStartOf="parent"
1515
app:layout_constraintTop_toTopOf="parent" />
1616

17-
1817
<com.google.android.material.bottomnavigation.BottomNavigationView
1918
android:id="@+id/bottom_nav_view"
2019
android:layout_width="match_parent"
2120
android:layout_height="wrap_content"
21+
app:itemIconTint="@color/bottom_nav_color"
22+
app:itemTextColor="@color/bottom_nav_color"
2223
app:labelVisibilityMode="labeled"
2324
app:layout_constraintBottom_toBottomOf="parent"
2425
app:layout_constraintEnd_toEndOf="parent"
2526
app:layout_constraintHorizontal_bias="0.5"
2627
app:layout_constraintStart_toStartOf="parent"
2728
app:menu="@menu/bottom_view_menu" />
2829

29-
3030
</androidx.constraintlayout.widget.ConstraintLayout>

core/src/main/java/org/openedx/core/ui/ComposeCommon.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import androidx.compose.material.TextFieldDefaults
4949
import androidx.compose.material.icons.Icons
5050
import androidx.compose.material.icons.filled.AccountCircle
5151
import androidx.compose.material.icons.filled.Close
52+
import androidx.compose.material.icons.filled.ManageAccounts
5253
import androidx.compose.material.icons.filled.Search
5354
import androidx.compose.runtime.Composable
5455
import androidx.compose.runtime.LaunchedEffect
@@ -200,8 +201,8 @@ fun Toolbar(
200201
onClick = { onSettingsClick() }
201202
) {
202203
Icon(
203-
painter = painterResource(id = R.drawable.core_ic_settings),
204-
tint = MaterialTheme.appColors.primary,
204+
imageVector = Icons.Default.ManageAccounts,
205+
tint = MaterialTheme.appColors.textAccent,
205206
contentDescription = stringResource(id = R.string.core_accessibility_settings)
206207
)
207208
}

core/src/main/res/values-night/colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
<color name="background">#FF19212F</color>
44
<color name="primary">#5478F9</color>
55
<color name="splash">#19212F</color>
6+
<color name="checked_tab_item">#879FF5</color>
7+
<color name="unchecked_tab_item">#8E9BAE</color>
68
</resources>

core/src/main/res/values/colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
<color name="background">#FFFFFF</color>
44
<color name="primary">#3C68FF</color>
55
<color name="splash">#517BFE</color>
6+
<color name="checked_tab_item">#3C68FF</color>
7+
<color name="unchecked_tab_item">#97A5BB</color>
68
</resources>

dashboard/src/main/java/org/openedx/courses/presentation/PrimaryCourseScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,9 @@ private fun PrimaryCourseTitle(
677677
modifier = Modifier.fillMaxWidth(),
678678
text = primaryCourse.course.name,
679679
style = MaterialTheme.appTypography.titleLarge,
680-
color = MaterialTheme.appColors.textDark
680+
color = MaterialTheme.appColors.textDark,
681+
overflow = TextOverflow.Ellipsis,
682+
maxLines = 3
681683
)
682684
Text(
683685
modifier = Modifier.fillMaxWidth(),

dashboard/src/main/java/org/openedx/learn/presentation/LearnFragment.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.openedx.learn.presentation
22

33
import android.os.Bundle
44
import android.view.View
5+
import androidx.compose.animation.core.animateFloatAsState
56
import androidx.compose.foundation.ExperimentalFoundationApi
67
import androidx.compose.foundation.background
78
import androidx.compose.foundation.clickable
@@ -20,6 +21,7 @@ import androidx.compose.material.MaterialTheme
2021
import androidx.compose.material.Text
2122
import androidx.compose.material.icons.Icons
2223
import androidx.compose.material.icons.filled.ExpandMore
24+
import androidx.compose.material.icons.filled.ManageAccounts
2325
import androidx.compose.runtime.Composable
2426
import androidx.compose.runtime.LaunchedEffect
2527
import androidx.compose.runtime.getValue
@@ -28,9 +30,9 @@ import androidx.compose.runtime.remember
2830
import androidx.compose.runtime.setValue
2931
import androidx.compose.ui.Alignment
3032
import androidx.compose.ui.Modifier
33+
import androidx.compose.ui.draw.rotate
3134
import androidx.compose.ui.graphics.Color
3235
import androidx.compose.ui.platform.LocalContext
33-
import androidx.compose.ui.res.painterResource
3436
import androidx.compose.ui.res.stringResource
3537
import androidx.compose.ui.tooling.preview.Preview
3638
import androidx.compose.ui.unit.Dp
@@ -157,8 +159,8 @@ private fun Title(
157159
}
158160
) {
159161
Icon(
160-
painter = painterResource(id = CoreR.drawable.core_ic_settings),
161-
tint = MaterialTheme.appColors.primary,
162+
imageVector = Icons.Default.ManageAccounts,
163+
tint = MaterialTheme.appColors.textAccent,
162164
contentDescription = stringResource(id = CoreR.string.core_accessibility_settings)
163165
)
164166
}
@@ -173,6 +175,10 @@ private fun LearnDropdownMenu(
173175
) {
174176
var expanded by remember { mutableStateOf(false) }
175177
var currentValue by remember { mutableStateOf(LearnType.COURSES) }
178+
val iconRotation by animateFloatAsState(
179+
targetValue = if (expanded) 180f else 0f,
180+
label = ""
181+
)
176182

177183
LaunchedEffect(currentValue) {
178184
viewPager.setCurrentItem(
@@ -199,6 +205,7 @@ private fun LearnDropdownMenu(
199205
style = MaterialTheme.appTypography.titleSmall
200206
)
201207
Icon(
208+
modifier = Modifier.rotate(iconRotation),
202209
imageVector = Icons.Default.ExpandMore,
203210
tint = MaterialTheme.appColors.textDark,
204211
contentDescription = null

dashboard/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<string name="dashboard_course_date">Course %1$s</string>
1010
<string name="dashboard_start_course">Start course</string>
1111
<string name="dashboard_resume_course">Resume Course</string>
12-
<string name="dashboard_past_due_assignment">%1$d Past Due Assignment</string>
12+
<string name="dashboard_past_due_assignment">%1$d Past Due Assignments</string>
1313
<string name="dashboard_view_all_with_count">View All (%1$d)</string>
1414
<string name="dashboard_view_all">View All</string>
1515
<string name="dashboard_assignment_due_in_days">%1$s Due in %2$s</string>

0 commit comments

Comments
 (0)