forked from AIDEA775/UNCmorfi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0658596
commit d578320
Showing
11 changed files
with
157 additions
and
16 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,4 @@ class HomeFragment : Fragment() { | |
requireActivity().setTitle(R.string.app_name) | ||
} | ||
|
||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/uncmorfi/ui/menu/InformationMessageView.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,29 @@ | ||
package com.uncmorfi.ui.menu | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.LayoutInflater | ||
import com.google.android.material.card.MaterialCardView | ||
import com.uncmorfi.R | ||
import kotlinx.android.synthetic.main.view_information_message.view.informationMessageButton | ||
import kotlinx.android.synthetic.main.view_information_message.view.informationMessageTextView | ||
|
||
class InformationMessageView @JvmOverloads constructor( | ||
context: Context, | ||
attr: AttributeSet? = null, | ||
defStyleAttr: Int = 0 | ||
) : MaterialCardView(context, attr, defStyleAttr) { | ||
|
||
init { | ||
LayoutInflater.from(context).inflate(R.layout.view_information_message, this, true) | ||
informationMessageButton.isClickable = false | ||
} | ||
|
||
fun setMessage(message : String){ | ||
informationMessageTextView.setText(message) | ||
} | ||
|
||
fun setButtonText(buttonText : String){ | ||
informationMessageButton.text = buttonText | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#000000" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="@android:color/white" android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/> | ||
</vector> |
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 |
---|---|---|
@@ -1,21 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
<androidx.constraintlayout.widget.ConstraintLayout 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" | ||
tools:context=".ui.menu.MenuFragment" | ||
android:id="@+id/swipeRefresh" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
android:layout_height="match_parent" | ||
tools:context=".ui.menu.MenuFragment"> | ||
|
||
<com.uncmorfi.ui.menu.InformationMessageView | ||
android:id="@+id/informationCard" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toTopOf="parent" | ||
style="@style/MaterialCard" | ||
app:rippleColor="@null" | ||
app:cardBackgroundColor="@color/primary_text"/> | ||
|
||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||
android:id="@+id/swipeRefresh" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/informationCard"> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/menuRecyclerView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginTop="8dp" | ||
android:clipToPadding="false" | ||
android:nestedScrollingEnabled="false" | ||
android:scrollbars="none" | ||
android:paddingTop="8dp" | ||
android:paddingBottom="64dp" | ||
tools:listitem="@layout/item_menu"> | ||
</androidx.recyclerview.widget.RecyclerView> | ||
|
||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | ||
tools:listitem="@layout/item_menu" /> | ||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<merge 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="wrap_content" | ||
tools:parentTag="com.google.android.material.card.MaterialCardView" | ||
tools:backgroundTint="@color/primary_text"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="8dp"> | ||
|
||
<ImageView | ||
android:id="@+id/informationMessageImageView" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="8dp" | ||
android:scaleType="centerCrop" | ||
android:src="@drawable/ic_outline_info" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/informationMessageTextView" | ||
app:layout_constraintBottom_toBottomOf="@id/informationMessageTextView" | ||
app:tint="@color/white" /> | ||
|
||
<TextView | ||
android:id="@+id/informationMessageTextView" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_margin="8dp" | ||
android:textColor="@color/white" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" | ||
app:layout_constraintBottom_toTopOf="@id/informationMessageButton" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/informationMessageImageView" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<Button | ||
android:id="@+id/informationMessageButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
style="@style/Widget.MaterialComponents.Button.TextButton" | ||
app:layout_constraintTop_toBottomOf="@id/informationMessageTextView" | ||
app:layout_constraintEnd_toEndOf="@id/informationMessageTextView"/> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</merge> |
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