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" />
|
|
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.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" />
|
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">
|
|
|
|
|
|
2015-12-26 15:21:21 +00:00
|
|
|
<com.github.data5tream.emojilib.EmojiTextView
|
2015-10-01 18:58:04 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_margin="5dp"
|
2016-03-05 13:54:19 +00:00
|
|
|
bind:parsemarkdown="@{group.name}"
|
2015-10-01 18:58:04 +00:00
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_margin="5dp">
|
2016-03-05 13:54:19 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:divider="@android:drawable/divider_horizontal_dark"
|
|
|
|
|
android:dividerPadding="8dp"
|
|
|
|
|
android:showDividers="middle"
|
|
|
|
|
android:orientation="vertical">
|
2015-12-26 15:21:21 +00:00
|
|
|
<com.github.data5tream.emojilib.EmojiTextView
|
2015-12-25 11:55:48 +00:00
|
|
|
android:layout_margin="5dp"
|
2015-10-01 18:58:04 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-03-05 13:54:19 +00:00
|
|
|
bind:parsemarkdown="@{group.description}" />
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:layout_margin="@dimen/card_padding">
|
|
|
|
|
<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"
|
2015-10-01 18:58:04 +00:00
|
|
|
android:layout_margin="5dp"
|
|
|
|
|
android:visibility="@{quest != null ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
|
|
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_margin="5dp"
|
|
|
|
|
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"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
>
|
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}"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
/>
|
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"
|
|
|
|
|
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"
|
|
|
|
|
android:orientation="vertical" />
|
|
|
|
|
|
|
|
|
|
</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}"
|
|
|
|
|
/>
|
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"
|
|
|
|
|
android:layout_margin="5dp"
|
|
|
|
|
android:visibility="@{quest != null ? View.VISIBLE : View.GONE}">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/questMemberView"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:padding="8dp" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:padding="8dp"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{group.quest.active? View.VISIBLE : View.GONE}">
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestAbort"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:backgroundTint="@color/btn_warning"
|
|
|
|
|
android:text="@string/quest.abort"
|
|
|
|
|
android:textColor="@android:color/white"
|
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:backgroundTint="@color/btn_warning"
|
|
|
|
|
android:text="@string/quest.leave"
|
|
|
|
|
android:textColor="@android:color/white"
|
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:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:padding="8dp"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{!group.quest.active? View.VISIBLE : View.GONE}">
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestAccept"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:backgroundTint="@color/btn_success"
|
|
|
|
|
android:text="@string/quest.accept"
|
|
|
|
|
android:textColor="@android:color/white"
|
|
|
|
|
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:backgroundTint="@color/btn_danger"
|
|
|
|
|
android:text="@string/quest.reject"
|
|
|
|
|
android:textColor="@android:color/white"
|
|
|
|
|
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:backgroundTint="@color/btn_warning"
|
|
|
|
|
android:text="@string/quest.begin"
|
|
|
|
|
android:textColor="@android:color/white"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{user.getId().equals(group.quest.leader) ? View.VISIBLE : View.GONE}" />
|
2016-02-18 17:31:31 +00:00
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnQuestCancel"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:backgroundTint="@color/btn_danger"
|
|
|
|
|
android:text="@string/quest.cancel"
|
|
|
|
|
android:textColor="@android:color/white"
|
2016-03-05 15:53:36 +00:00
|
|
|
android:visibility="@{user.getId().equals(group.quest.leader) ? 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>
|