2015-10-01 18:58:04 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
|
|
<layout xmlns:bind="http://schemas.android.com/apk/res-auto"
|
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
|
|
|
|
|
|
<data>
|
|
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.Group" />
|
2016-03-28 16:43:15 +00:00
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.inventory.QuestContent" />
|
2016-02-18 17:31:31 +00:00
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser" />
|
2015-10-01 18:58:04 +00:00
|
|
|
<import type="android.view.View" />
|
2015-12-17 12:42:31 +00:00
|
|
|
<import type="android.text.Html"/>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
<variable
|
2016-03-05 13:54:19 +00:00
|
|
|
name="group"
|
2015-10-01 18:58:04 +00:00
|
|
|
type="Group" />
|
|
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="quest"
|
|
|
|
|
type="QuestContent" />
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="user"
|
|
|
|
|
type="HabitRPGUser" />
|
2016-04-08 14:21:05 +00:00
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="hideParticipantCard"
|
|
|
|
|
type="Boolean" />
|
|
|
|
|
|
2015-10-01 18:58:04 +00:00
|
|
|
</data>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<android.support.v4.widget.NestedScrollView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:scrollbarSize="3dp"
|
|
|
|
|
android:scrollbarThumbVertical="@color/md_grey_500"
|
|
|
|
|
|
|
|
|
|
android:scrollbars="vertical">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
2016-03-16 12:52:42 +00:00
|
|
|
<TextView
|
2015-10-01 18:58:04 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:text="@{group.name}"
|
2016-04-08 14:21:05 +00:00
|
|
|
style="@style/SectionTitle"
|
|
|
|
|
android:visibility="@{group.description.length() == 0 && group.balance == 0 ? View.GONE : View.VISIBLE}"/>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-04-08 14:21:05 +00:00
|
|
|
style="@style/CardView.Default"
|
2016-06-14 13:47:06 +00:00
|
|
|
android:visibility="@{group.description.length() == 0 && group.leaderMessage.length() == 0 && group.balance == 0 ? View.GONE : View.VISIBLE}">
|
2016-03-05 13:54:19 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardContent"
|
|
|
|
|
android:divider="?android:listDivider"
|
2016-03-05 13:54:19 +00:00
|
|
|
android:showDividers="middle"
|
|
|
|
|
android:orientation="vertical">
|
2016-06-21 09:28:51 +00:00
|
|
|
<net.pherth.android.emoji_library.EmojiTextView
|
2016-03-16 12:52:42 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
bind:parsemarkdown="@{group.description}" />
|
2016-06-14 13:47:06 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:visibility="@{group.leaderMessage.length() == 0 ? View.GONE : View.VISIBLE}">
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{@string/leaderMessage(group.leaderName)}" />
|
2016-06-21 09:28:51 +00:00
|
|
|
<net.pherth.android.emoji_library.EmojiTextView
|
2016-06-14 13:47:06 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
bind:parsemarkdown="@{group.leaderMessage}"/>
|
|
|
|
|
</LinearLayout>
|
2016-03-05 13:54:19 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
2016-03-08 11:04:38 +00:00
|
|
|
android:visibility='@{group.type.equals("guild") ? View.VISIBLE : View.GONE}' >
|
2016-03-05 13:54:19 +00:00
|
|
|
<TextView
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:text="@string/gems"/>
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{String.valueOf(group.balance * 4)}"/>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
</android.support.v7.widget.CardView>
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2015-12-17 13:01:39 +00:00
|
|
|
android:text="@string/quest"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/SectionTitle"
|
2015-10-01 18:58:04 +00:00
|
|
|
android:visibility="@{quest != null ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
2016-03-15 12:53:59 +00:00
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardView.Default"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:visibility="@{quest != null && !group.quest.active ? View.VISIBLE : View.GONE}">
|
2016-03-16 12:52:42 +00:00
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
style="@style/CardContent">
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.invitation"
|
|
|
|
|
style="@style/CardTitle" />
|
|
|
|
|
<TextView
|
2016-03-15 12:53:59 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:text="@string/quest.invitation.text"
|
|
|
|
|
style="@style/CardText"
|
|
|
|
|
android:visibility="@{user.getParty().getQuest().RSVPNeeded? View.VISIBLE : View.GONE}"/>
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:orientation="horizontal"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:layout_gravity="right">
|
2016-03-15 12:53:59 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestAccept"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.accept"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_success"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:visibility="@{user.getParty().getQuest().RSVPNeeded? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestReject"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.reject"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_danger"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:visibility="@{user.getParty().getQuest().RSVPNeeded? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestBegin"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.begin"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_warning"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:visibility="@{user.getId().equals(group.quest.leader) ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestCancel"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.cancel"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_danger"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-15 12:53:59 +00:00
|
|
|
android:visibility="@{user.getId().equals(group.quest.leader) ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
2016-03-16 12:52:42 +00:00
|
|
|
</LinearLayout>
|
|
|
|
|
</android.support.v7.widget.CardView>
|
2016-03-15 12:53:59 +00:00
|
|
|
|
2015-10-01 18:58:04 +00:00
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardView.Default"
|
2015-10-01 18:58:04 +00:00
|
|
|
android:visibility="@{quest != null ? View.VISIBLE : View.GONE}">
|
|
|
|
|
|
2015-12-17 12:58:47 +00:00
|
|
|
<LinearLayout
|
2015-10-01 18:58:04 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2015-12-17 12:58:47 +00:00
|
|
|
android:orientation="vertical"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardContent">
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2015-12-08 21:34:14 +00:00
|
|
|
android:layout_marginBottom="8dp"
|
2015-12-17 12:58:47 +00:00
|
|
|
android:text="@{quest.text}"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardTitle"
|
2015-12-17 12:58:47 +00:00
|
|
|
/>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
<ImageView
|
2015-12-17 12:50:55 +00:00
|
|
|
android:layout_width="wrap_content"
|
2015-12-08 21:34:14 +00:00
|
|
|
android:layout_height="wrap_content"
|
2015-12-17 12:58:47 +00:00
|
|
|
android:layout_marginBottom="8dp"
|
2016-01-12 16:08:02 +00:00
|
|
|
bind:questImageName='@{"quest_"+ quest.key}'
|
2015-12-17 12:58:47 +00:00
|
|
|
/>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
2016-03-06 10:07:16 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="?android:buttonBarStyle"
|
2016-03-06 10:07:16 +00:00
|
|
|
android:visibility="@{group.quest.active? View.VISIBLE : View.GONE}">
|
|
|
|
|
|
|
|
|
|
<include
|
|
|
|
|
android:id="@+id/bossHpBar"
|
|
|
|
|
layout="@layout/value_bar"
|
|
|
|
|
bind:barForegroundColor="@{@color/hpColor}"
|
|
|
|
|
bind:description='@{String.format("%.0f",Math.ceil(group.quest.getProgress().hp))+" / "+String.format("%.0f",Math.ceil(quest.boss.hp))}'
|
|
|
|
|
bind:icon="@drawable/ic_header_heart"
|
|
|
|
|
bind:partyMembers="@{true}"
|
|
|
|
|
bind:text='@{"Boss Health"}'
|
|
|
|
|
bind:weightToShow="@{(float)(group.quest.getProgress().hp / quest.boss.hp)}" />
|
|
|
|
|
|
|
|
|
|
<include
|
|
|
|
|
android:id="@+id/bossRageBar"
|
|
|
|
|
layout="@layout/value_bar"
|
|
|
|
|
bind:barForegroundColor="@{@color/mpColor}"
|
|
|
|
|
bind:description='@{String.format("%.0f",Math.ceil(group.quest.getProgress().rage))+" / "+String.format("%.0f",Math.ceil(quest.boss.rage_value))}'
|
|
|
|
|
bind:icon="@drawable/ic_header_magic"
|
|
|
|
|
bind:partyMembers="@{true}"
|
|
|
|
|
bind:text='@{"Rage"}'
|
|
|
|
|
bind:weightToShow="@{(float)(group.quest.getProgress().rage / quest.boss.rage_value)}" />
|
|
|
|
|
|
|
|
|
|
<android.support.v7.widget.RecyclerView
|
|
|
|
|
android:id="@+id/collectionStats"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_margin="@dimen/row_padding"/>
|
2016-03-06 10:07:16 +00:00
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
2015-12-17 12:58:47 +00:00
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{quest.notes != null ? Html.fromHtml(quest.notes) : null}"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardText"
|
2015-12-17 12:58:47 +00:00
|
|
|
/>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
2015-12-17 12:58:47 +00:00
|
|
|
</LinearLayout>
|
2015-10-01 18:58:04 +00:00
|
|
|
|
|
|
|
|
</android.support.v7.widget.CardView>
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="@style/CardView.Default"
|
2016-04-08 14:21:05 +00:00
|
|
|
android:visibility="@{quest != null && !hideParticipantCard ? View.VISIBLE : View.GONE}">
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:orientation="vertical"
|
|
|
|
|
style="@style/CardContent">
|
2016-02-18 17:31:31 +00:00
|
|
|
|
2016-03-15 12:54:21 +00:00
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:text="@string/quest.participants"
|
|
|
|
|
android:id="@+id/textView12"
|
|
|
|
|
style="@style/CardTitle" />
|
2016-03-15 12:54:21 +00:00
|
|
|
|
2016-02-18 17:31:31 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/questMemberView"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:divider="?android:listDivider"
|
|
|
|
|
android:showDividers="middle"
|
|
|
|
|
style="@style/CardContent"/>
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<LinearLayout
|
2016-03-16 12:52:42 +00:00
|
|
|
android:layout_width="wrap_content"
|
2016-02-18 17:31:31 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
2016-03-16 12:52:42 +00:00
|
|
|
style="?android:buttonBarStyle"
|
|
|
|
|
android:visibility="@{group.quest.active? View.VISIBLE : View.GONE}"
|
|
|
|
|
android:layout_gravity="right">
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestAbort"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.abort"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_danger"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{(group.quest != null && user.getId().equals(group.quest.leader))? View.VISIBLE : View.GONE}" />
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestLeave"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/quest.leave"
|
2016-03-16 12:52:42 +00:00
|
|
|
android:textColor="@color/btn_warning"
|
|
|
|
|
style="?android:buttonBarButtonStyle"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{(!user.getId().equals(group.quest.leader) && group.quest.members.containsKey(user.getId()))? View.VISIBLE : View.GONE}" />
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
</android.support.v7.widget.CardView>
|
2015-10-01 18:58:04 +00:00
|
|
|
</LinearLayout>
|
|
|
|
|
</android.support.v4.widget.NestedScrollView>
|
|
|
|
|
</layout>
|