Skip to content

Commit

Permalink
Revert "[All] Consolidate vector resources into pandares (#1021)" (#1054
Browse files Browse the repository at this point in the history
)

This reverts commit f9f07f8.
  • Loading branch information
JordanMarshall authored Oct 14, 2020
1 parent fff2337 commit e05e3c8
Show file tree
Hide file tree
Showing 612 changed files with 5,535 additions and 888 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ class InboxConversationPage : BasePage(R.id.inboxConversationPage) {
}

fun assertStarred() {
onView(withId(R.id.starred)).check(matches(ImageButtonDrawableMatcher(R.drawable.ic_star_filled, ThemePrefs.brandColor)))
onView(withId(R.id.starred)).check(matches(ImageButtonDrawableMatcher(R.drawable.vd_star_filled, ThemePrefs.brandColor)))
}

fun assertNotStarred() {
onView(withId(R.id.starred)).check(matches(ImageButtonDrawableMatcher(R.drawable.ic_star, ThemePrefs.brandColor)))
onView(withId(R.id.starred)).check(matches(ImageButtonDrawableMatcher(R.drawable.vd_star, ThemePrefs.brandColor)))
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class PickerSubmissionUploadRenderTest : StudentRenderTest() {
@TestMetaData(Priority.P3, FeatureCategory.SUBMISSIONS, TestCategory.RENDER)
fun displaysListState() {
val fileItemStates = listOf(
PickerListItemViewState(0, R.drawable.ic_media_recordings, "title", "12.3 KB")
PickerListItemViewState(0, R.drawable.vd_media_recordings, "title", "12.3 KB")
)
loadPageWithViewState(
PickerSubmissionUploadViewState.FileList(
Expand All @@ -108,7 +108,7 @@ class PickerSubmissionUploadRenderTest : StudentRenderTest() {
}

val fileItemStates = listOf(
PickerListItemViewState(0, R.drawable.ic_media_recordings, "title", "12.3 KB")
PickerListItemViewState(0, R.drawable.vd_media_recordings, "title", "12.3 KB")
)
loadPageWithViewState(
PickerSubmissionUploadViewState.FileList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SubmissionFilesRenderTest : StudentRenderTest() {
private val dataTemplate = SubmissionFileData(
id = 123L,
name = "File name",
icon = R.drawable.ic_document,
icon = R.drawable.vd_document,
thumbnailUrl = null,
isSelected = false,
iconColor = Color.BLUE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class NavigationActivity : BaseRouterActivity(), Navigation, MasqueradingDialog.
Logger.e("Error getting version: " + e)
}

toolbar.setNavigationIcon(R.drawable.ic_hamburger)
toolbar.setNavigationIcon(R.drawable.vd_hamburger)
toolbar.navigationContentDescription = getString(R.string.navigation_drawer_open)
toolbar.setNavigationOnClickListener {
openNavigationDrawer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ class CourseBrowserWebViewHolder(view: View, val color: Int) : RecyclerView.View
fun bind(tab: Tab, clickedCallback: (Tab) -> Unit) {

val res: Int = when (tab.tabId) {
Tab.OUTCOMES_ID -> R.drawable.ic_outcomes
Tab.CONFERENCES_ID -> R.drawable.ic_conferences
else /* Tab.COLLABORATIONS_ID */ -> R.drawable.ic_collaborations
Tab.OUTCOMES_ID -> R.drawable.vd_outcomes
Tab.CONFERENCES_ID -> R.drawable.vd_conferences
else /* Tab.COLLABORATIONS_ID */ -> R.drawable.vd_collaborations
}

var d = VectorDrawableCompat.create(itemView.context.resources, res, null)
Expand Down Expand Up @@ -128,26 +128,26 @@ class CourseBrowserViewHolder(view: View, val color: Int) : RecyclerView.ViewHol

fun bind(tab: Tab, clickedCallback: (Tab) -> Unit) {
val res: Int = when (tab.tabId) {
Tab.ASSIGNMENTS_ID -> R.drawable.ic_assignment
Tab.QUIZZES_ID -> R.drawable.ic_quiz
Tab.DISCUSSIONS_ID -> R.drawable.ic_discussion
Tab.ANNOUNCEMENTS_ID -> R.drawable.ic_announcement
Tab.PEOPLE_ID -> R.drawable.ic_people
Tab.FILES_ID -> R.drawable.ic_files
Tab.PAGES_ID -> R.drawable.ic_pages
Tab.MODULES_ID -> R.drawable.ic_modules
Tab.SYLLABUS_ID -> R.drawable.ic_syllabus
Tab.OUTCOMES_ID -> R.drawable.ic_outcomes
Tab.GRADES_ID -> R.drawable.ic_grades
Tab.HOME_ID -> R.drawable.ic_home
Tab.CONFERENCES_ID -> R.drawable.ic_conferences
Tab.COLLABORATIONS_ID -> R.drawable.ic_collaborations
Tab.SETTINGS_ID -> R.drawable.ic_settings
Tab.ASSIGNMENTS_ID -> R.drawable.vd_assignment
Tab.QUIZZES_ID -> R.drawable.vd_quiz
Tab.DISCUSSIONS_ID -> R.drawable.vd_discussion
Tab.ANNOUNCEMENTS_ID -> R.drawable.vd_announcement
Tab.PEOPLE_ID -> R.drawable.vd_people
Tab.FILES_ID -> R.drawable.vd_files
Tab.PAGES_ID -> R.drawable.vd_pages
Tab.MODULES_ID -> R.drawable.vd_modules
Tab.SYLLABUS_ID -> R.drawable.vd_syllabus
Tab.OUTCOMES_ID -> R.drawable.vd_outcomes
Tab.GRADES_ID -> R.drawable.vd_grades
Tab.HOME_ID -> R.drawable.vd_home
Tab.CONFERENCES_ID -> R.drawable.vd_conferences
Tab.COLLABORATIONS_ID -> R.drawable.vd_collaborations
Tab.SETTINGS_ID -> R.drawable.vd_settings
else -> {
// Determine if it's the attendance tool
if (tab.type == Tab.TYPE_EXTERNAL) {
R.drawable.ic_lti
} else R.drawable.ic_canvas_logo
R.drawable.vd_lti
} else R.drawable.vd_canvas_logo
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FileSearchFragment : ParentFragment(), FileSearchView {
ViewStyler.setStatusBarLight(requireActivity())

// Set up empty state
emptyPandaView.getEmptyViewImage()?.setImageResource(R.drawable.ic_panda_nofiles)
emptyPandaView.getEmptyViewImage()?.setImageResource(R.drawable.vd_panda_nofiles)
emptyPandaView.setListEmpty()
checkIfEmpty()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AccountPreferencesFragment : ParentFragment() {

override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
val view: View = convertView ?: inflater.inflate(R.layout.settings_spinner, parent, false)
view.indicator.setImageDrawable(ColorKeeper.getColoredDrawable(requireContext(), R.drawable.ic_expand, Color.WHITE))
view.indicator.setImageDrawable(ColorKeeper.getColoredDrawable(requireContext(), R.drawable.vd_expand, Color.WHITE))
view.indicator.setColorFilter(ContextCompat.getColor(requireContext(), R.color.defaultTextGray))
view.title.text = getItem(position).toString()
return view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AssignmentListFragment : ParentFragment(), Bookmarkable {
if(!isAdded) return // Refresh can finish after user has left screen, causing emptyView to be null
setRefreshing(false)
if (recyclerAdapter.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_space, R.string.noAssignments, R.string.noAssignmentsSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_space, R.string.noAssignments, R.string.noAssignmentsSubtext)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class BookmarksFragment : ParentFragment() {
}

private fun applyEmptyImage() {
emptyView.getEmptyViewImage()?.setImageResource(R.drawable.ic_panda_nobookmarks)
emptyView.getEmptyViewImage()?.setImageResource(R.drawable.vd_panda_nobookmarks)
emptyView.setTitleText(R.string.noBookmarks)
emptyView.setMessageText(R.string.noBookmarksSubtext)
emptyView.setListEmpty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ class CourseModuleProgressionFragment : ParentFragment(), Bookmarkable {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

prev_item.background = ColorKeeper.getColoredDrawable(requireActivity(), R.drawable.ic_chevron_left, canvasContext)
next_item.background = ColorKeeper.getColoredDrawable(requireActivity(), R.drawable.ic_chevron_right, canvasContext)
prev_item.background = ColorKeeper.getColoredDrawable(requireActivity(), R.drawable.vd_chevron_left, canvasContext)
next_item.background = ColorKeeper.getColoredDrawable(requireActivity(), R.drawable.vd_chevron_right, canvasContext)
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ open class DiscussionListFragment : ParentFragment(), Bookmarkable {
if(canPost) createNewDiscussion?.show()
if (recyclerAdapter.size() == 0) {
if (isAnnouncement) {
setEmptyView(emptyView, R.drawable.ic_panda_noannouncements, R.string.noAnnouncements, R.string.noAnnouncementsSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_noannouncements, R.string.noAnnouncements, R.string.noAnnouncementsSubtext)
} else {
setEmptyView(emptyView, R.drawable.ic_panda_nodiscussions, R.string.noDiscussions, R.string.noDiscussionsSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_nodiscussions, R.string.noDiscussions, R.string.noDiscussionsSubtext)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class EditFavoritesFragment : ParentFragment() {
override fun onRefreshFinished() {
setRefreshing(false)
if (recyclerAdapter?.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_nocourses, R.string.noCourses, R.string.noCoursesSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_nocourses, R.string.noCourses, R.string.noCoursesSubtext)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class FileDetailsFragment : ParentFragment() {
file?.let {
if (it.lockInfo != null) {
// File is locked
fileIcon.setImageResource(R.drawable.ic_lock)
fileIcon.setImageResource(R.drawable.vd_lock)
fileIcon.contentDescription = getString(R.string.locked_icon)
openButton.visibility = View.GONE
downloadButton.visibility = View.GONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class FileListFragment : ParentFragment(), Bookmarkable {
setRefreshing(false)

if (recyclerAdapter?.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_nofiles, R.string.noFiles, getNoFileSubtextId())
setEmptyView(emptyView, R.drawable.vd_panda_nofiles, R.string.noFiles, getNoFileSubtextId())
}
}
}
Expand Down Expand Up @@ -394,7 +394,7 @@ class FileListFragment : ParentFragment(), Bookmarkable {
}
recyclerAdapter?.remove(deletedItem)
if (recyclerAdapter?.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_nofiles, R.string.noFiles, getNoFileSubtextId())
setEmptyView(emptyView, R.drawable.vd_panda_nofiles, R.string.noFiles, getNoFileSubtextId())
}
StudentPrefs.staleFolderIds = StudentPrefs.staleFolderIds + folder!!.id
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class GradesListFragment : ParentFragment(), Bookmarkable {
private fun configureViews(rootView: View) {
val appBarLayout = rootView.findViewById<AppBarLayout>(R.id.appbar)

val lockDrawable = ColorKeeper.getColoredDrawable(requireContext(), R.drawable.ic_lock, ContextCompat.getColor(requireContext(), R.color.canvasTextDark))
val lockDrawable = ColorKeeper.getColoredDrawable(requireContext(), R.drawable.vd_lock, ContextCompat.getColor(requireContext(), R.color.canvasTextDark))
lockedGradeImage.setImageDrawable(lockDrawable)

setupListeners()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class InboxConversationFragment : ParentFragment() {
}

starred.setOnClickListener { toggleStarred() }
starred.setImageResource(if (conversation.isStarred) R.drawable.ic_star_filled else R.drawable.ic_star)
starred.setImageResource(if (conversation.isStarred) R.drawable.vd_star_filled else R.drawable.vd_star)
ColorUtils.colorIt(ThemePrefs.brandColor, starred.drawable)
starred.alpha = 1f
starred.isEnabled = true
Expand All @@ -265,7 +265,7 @@ class InboxConversationFragment : ParentFragment() {
starCall?.cancel()
val shouldStar = !conversation.isStarred
tryWeave {
starred.setImageResource(if (shouldStar) R.drawable.ic_star_filled else R.drawable.ic_star)
starred.setImageResource(if (shouldStar) R.drawable.vd_star_filled else R.drawable.vd_star)
ColorUtils.colorIt(ThemePrefs.brandColor, starred.drawable)
starred.alpha = 0.35f
starred.isEnabled = false
Expand All @@ -275,7 +275,7 @@ class InboxConversationFragment : ParentFragment() {
onConversationUpdated(false)
} catch {
toast(R.string.errorConversationGeneric)
starred.setImageResource(if (!shouldStar) R.drawable.ic_star_filled else R.drawable.ic_star)
starred.setImageResource(if (!shouldStar) R.drawable.vd_star_filled else R.drawable.vd_star)
ColorUtils.colorIt(ThemePrefs.brandColor, starred.drawable)
refreshConversationData()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class InboxFragment : ParentFragment() {
setupListeners()
setupFilter()
setupFilterText()
emptyInboxView.setEmptyViewImage(requireContext().getDrawableCompat(R.drawable.ic_panda_inboxzero))
emptyInboxView.setEmptyViewImage(requireContext().getDrawableCompat(R.drawable.vd_panda_inboxzero))
emptyInboxView.setMessageText(R.string.nothingUnreadSubtext)
emptyInboxView.getMessage().importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
emptyInboxView.setTitleText(R.string.nothingUnread)
Expand Down Expand Up @@ -204,19 +204,19 @@ class InboxFragment : ParentFragment() {
return when (scope) {
Scope.ALL -> ScopeParams(R.string.nothingUnread,
R.string.nothingUnreadSubtext,
R.drawable.ic_panda_inboxzero)
R.drawable.vd_panda_inboxzero)
Scope.UNREAD -> ScopeParams(R.string.nothingUnread,
R.string.nothingUnreadSubtext,
R.drawable.ic_panda_inboxzero)
R.drawable.vd_panda_inboxzero)
Scope.STARRED -> ScopeParams(R.string.nothingStarred,
R.string.nothingStarredSubtext,
R.drawable.ic_panda_inboxstarred)
R.drawable.vd_panda_inboxstarred)
Scope.SENT -> ScopeParams(R.string.nothingSent,
R.string.nothingSentSubtext,
R.drawable.ic_panda_inboxsent)
R.drawable.vd_panda_inboxsent)
Scope.ARCHIVED -> ScopeParams(R.string.nothingArchived,
R.string.nothingArchivedSubtext,
R.drawable.ic_panda_inboxarchived)
R.drawable.vd_panda_inboxarchived)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ class ModuleListFragment : ParentFragment(), Bookmarkable {
if(isError) {
// We need to force the empty view to be visible to use it for errors on refresh
emptyView?.setVisible()
setEmptyView(emptyView, R.drawable.ic_panda_nomodules, R.string.modulesLocked, R.string.modulesLockedSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_nomodules, R.string.modulesLocked, R.string.modulesLockedSubtext)
} else if (recyclerAdapter.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_nomodules, R.string.noModules, R.string.noModulesSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_nomodules, R.string.noModules, R.string.noModulesSubtext)
} else if (!arguments?.getString(MODULE_ID).isNullOrEmpty()) {
val groupPosition = recyclerAdapter.getGroupItemPosition(arguments!!.getString(MODULE_ID)!!.toLong())
if (groupPosition >= 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NotificationListFragment : ParentFragment(), Bookmarkable {
setRefreshing(false)
editOptions.setGone()
if (recyclerAdapter.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_noalerts, R.string.noNotifications, R.string.noNotificationsSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_noalerts, R.string.noNotifications, R.string.noNotificationsSubtext)
if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
emptyView.setGuidelines(.2f, .7f, .74f, .15f, .85f)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class PageListFragment : ParentFragment(), Bookmarkable {

override fun onRefreshFinished() {
setRefreshing(false)
setEmptyView(emptyView, R.drawable.ic_panda_nofiles, R.string.noPages, R.string.noPagesSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_nofiles, R.string.noPages, R.string.noPagesSubtext)
}
}, defaultSelectedPageTitle)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PeopleDetailsFragment : ParentFragment(), Bookmarkable {
compose.colorNormal = color
compose.colorPressed = color

compose.setIconDrawable(ColorKeeper.getColoredDrawable(requireContext(), R.drawable.ic_send, Color.WHITE))
compose.setIconDrawable(ColorKeeper.getColoredDrawable(requireContext(), R.drawable.vd_send, Color.WHITE))
compose.setOnClickListener {
// Messaging other users is not available in Student view
val route = if (ApiPrefs.isStudentView) NothingToSeeHereFragment.makeRoute() else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class QuizListFragment : ParentFragment(), Bookmarkable {
override fun onRefreshFinished() {
setRefreshing(false)
if (recyclerAdapter?.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_quizzes_rocket, R.string.noQuizzes, R.string.noQuizzesSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_quizzes_rocket, R.string.noQuizzes, R.string.noQuizzesSubtext)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ToDoListFragment : ParentFragment() {
setRefreshing(false)
editOptions.setGone()
if (recyclerAdapter.size() == 0) {
setEmptyView(emptyView, R.drawable.ic_panda_sleeping, R.string.noTodos, R.string.noTodosSubtext)
setEmptyView(emptyView, R.drawable.vd_panda_sleeping, R.string.noTodos, R.string.noTodosSubtext)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ViewUnsupportedFileFragment : Fragment() {
private var mDisplayName by StringArg()
private var mContentType by StringArg()
private var mPreviewUri by ParcelableArg(Uri.EMPTY)
private var mFallbackIcon by IntArg(R.drawable.ic_attachment)
private var mFallbackIcon by IntArg(R.drawable.vd_utils_attachment)
private var mEditableFile: EditableFile? by NullableParcelableArg()
private var mToolbarColor by IntArg(0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ class AnnouncementViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)

val icon = when (announcement.icon) {
AccountNotification.ACCOUNT_NOTIFICATION_ERROR,
AccountNotification.ACCOUNT_NOTIFICATION_WARNING -> R.drawable.ic_warning
AccountNotification.ACCOUNT_NOTIFICATION_CALENDAR -> R.drawable.ic_calendar
AccountNotification.ACCOUNT_NOTIFICATION_QUESTION -> R.drawable.ic_question_mark
else -> R.drawable.ic_info
AccountNotification.ACCOUNT_NOTIFICATION_WARNING -> R.drawable.vd_warning
AccountNotification.ACCOUNT_NOTIFICATION_CALENDAR -> R.drawable.vd_calendar_announcement
AccountNotification.ACCOUNT_NOTIFICATION_QUESTION -> R.drawable.vd_question_mark
else -> R.drawable.vd_info
}

announcementIcon.setImageResource(icon)
Expand Down
Loading

0 comments on commit e05e3c8

Please sign in to comment.