-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Student][Hotfix-6.7.1] Cherry pick student view unsupported feature …
…screen (#798)
- Loading branch information
1 parent
911a080
commit b49b9e7
Showing
11 changed files
with
566 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
apps/student/src/main/java/com/instructure/student/activity/NothingToSeeHereFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (C) 2020 - present Instructure, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.instructure.student.activity | ||
|
||
import android.graphics.Color | ||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import com.instructure.interactions.router.Route | ||
import com.instructure.pandautils.utils.ViewStyler | ||
import com.instructure.pandautils.utils.setupAsBackButton | ||
import com.instructure.student.R | ||
import com.instructure.student.fragment.ParentFragment | ||
import kotlinx.android.synthetic.main.fragment_nothing_to_see_here.* | ||
|
||
class NothingToSeeHereFragment : ParentFragment() { | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = | ||
inflater.inflate(R.layout.fragment_nothing_to_see_here, container, false) | ||
|
||
override fun title() = "" // Don't need this | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
applyTheme() | ||
} | ||
|
||
override fun applyTheme() { | ||
toolbar.setupAsBackButton(this) | ||
ViewStyler.themeToolbar(requireActivity(), toolbar, Color.WHITE, Color.BLACK, false) | ||
} | ||
|
||
companion object { | ||
fun newInstance(): NothingToSeeHereFragment { | ||
return NothingToSeeHereFragment() | ||
} | ||
|
||
@JvmStatic | ||
fun makeRoute() = Route(NothingToSeeHereFragment::class.java, null) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
apps/student/src/main/res/layout/fragment_nothing_to_see_here.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
- Copyright (C) 2020 - present Instructure, Inc. | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, version 3 of the License. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
~ | ||
--> | ||
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/canvasBackgroundWhite"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?android:attr/actionBarSize" | ||
android:background="@android:color/white" | ||
android:elevation="6dp" | ||
app:popupTheme="@style/ToolBarPopupStyle" | ||
app:theme="@style/ToolBarStyle" | ||
app:title="@string/unsupportedFeature" | ||
app:titleTextColor="@color/defaultTextDark" /> | ||
|
||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:padding="32dp"> | ||
|
||
<ImageView | ||
android:id="@+id/iconImageView" | ||
android:layout_width="234dp" | ||
android:layout_height="200dp" | ||
android:layout_marginBottom="32dp" | ||
android:importantForAccessibility="no" | ||
android:scaleType="fitCenter" | ||
app:layout_constraintBottom_toTopOf="@+id/titleTextView" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintVertical_chainStyle="packed" | ||
app:srcCompat="@drawable/vd_panda_nothing_to_see" /> | ||
|
||
<TextView | ||
android:id="@+id/titleTextView" | ||
style="@style/TextFont.Medium" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/nothingToSeeHere" | ||
android:textColor="#2D3B45" | ||
android:textSize="24sp" | ||
app:layout_constraintBottom_toTopOf="@+id/messageTextView" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/iconImageView" /> | ||
|
||
<TextView | ||
android:id="@+id/messageTextView" | ||
style="@style/TextFont.Regular" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:text="@string/featureNotAllowedInStudentView" | ||
android:textColor="@color/defaultTextDark" | ||
android:textSize="16sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/titleTextView" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
|
||
</FrameLayout> |
Oops, something went wrong.