-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added message if no actions are available
- Loading branch information
1 parent
6ee3ebf
commit cf892ef
Showing
10 changed files
with
111 additions
and
12 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
30 changes: 30 additions & 0 deletions
30
actions/src/main/kotlin/com/alfresco/content/actions/ViewEmptyMessage.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,30 @@ | ||
package com.alfresco.content.actions | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.LayoutInflater | ||
import android.widget.FrameLayout | ||
import androidx.annotation.StringRes | ||
import com.airbnb.epoxy.ModelProp | ||
import com.airbnb.epoxy.ModelView | ||
import com.alfresco.content.actions.databinding.ViewEmptyMessageBinding | ||
|
||
@ModelView(autoLayout = ModelView.Size.MATCH_WIDTH_MATCH_HEIGHT) | ||
class ViewEmptyMessage @JvmOverloads constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0, | ||
) : FrameLayout(context, attrs, defStyleAttr) { | ||
|
||
private val binding = ViewEmptyMessageBinding.inflate(LayoutInflater.from(context), this) | ||
|
||
@ModelProp | ||
fun setTitle(@StringRes stringRes: Int) { | ||
binding.title.text = resources.getText(stringRes) | ||
} | ||
|
||
@ModelProp | ||
fun setMessage(@StringRes stringRes: Int) { | ||
binding.message.text = resources.getText(stringRes) | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<merge xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical" | ||
android:padding="8dp"> | ||
|
||
<TextView | ||
android:id="@+id/title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="16dp" | ||
android:textAlignment="center" | ||
android:textAppearance="?attr/textAppearanceHeadline6" /> | ||
|
||
<TextView | ||
android:id="@+id/message" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="8dp" | ||
android:textAlignment="center" | ||
android:textAppearance="?attr/textAppearanceBody2" | ||
android:textColor="@color/color_on_surface_60" /> | ||
|
||
</LinearLayout> | ||
</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
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