Added PlayerAdapter
Still need to complete Power creation, edition and listing. Need to complete Player listing and deletion.
This commit is contained in:
parent
9ca863a607
commit
a3831597d0
25 changed files with 399 additions and 113 deletions
|
@ -11,6 +11,17 @@
|
|||
android:background="@color/primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
tools:text="Kauron"/>
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<ScrollView
|
||||
|
@ -240,6 +251,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:onClick="onAttackClick"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
@ -275,7 +287,7 @@
|
|||
android:layout_row="0"
|
||||
android:layout_column="0"
|
||||
android:id="@+id/FUE"
|
||||
android:hint="@string/FUE" />
|
||||
tools:text="@string/FUE" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -286,7 +298,7 @@
|
|||
android:layout_row="1"
|
||||
android:layout_column="0"
|
||||
android:id="@+id/CON"
|
||||
android:hint="@string/CON" />
|
||||
tools:text="@string/CON" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -297,7 +309,7 @@
|
|||
android:layout_row="0"
|
||||
android:layout_column="1"
|
||||
android:id="@+id/DES"
|
||||
android:hint="@string/DES" />
|
||||
tools:text="@string/DES" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -308,7 +320,7 @@
|
|||
android:layout_row="1"
|
||||
android:layout_column="1"
|
||||
android:id="@+id/INT"
|
||||
android:hint="@string/INT" />
|
||||
tools:text="@string/INT" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -319,7 +331,7 @@
|
|||
android:layout_row="0"
|
||||
android:layout_column="2"
|
||||
android:id="@+id/SAB"
|
||||
android:hint="@string/SAB" />
|
||||
tools:text="@string/SAB" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -330,7 +342,7 @@
|
|||
android:layout_row="1"
|
||||
android:layout_column="2"
|
||||
android:id="@+id/CAR"
|
||||
android:hint="@string/CAR" />
|
||||
tools:text="@string/CAR" />
|
||||
</GridLayout>
|
||||
</HorizontalScrollView>
|
||||
</LinearLayout>
|
||||
|
@ -372,7 +384,7 @@
|
|||
android:layout_row="0"
|
||||
android:layout_column="0"
|
||||
android:id="@+id/CA"
|
||||
android:hint="@string/CA" />
|
||||
tools:text="@string/CA" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -383,7 +395,7 @@
|
|||
android:layout_row="0"
|
||||
android:layout_column="1"
|
||||
android:id="@+id/FORT"
|
||||
android:hint="@string/FORT" />
|
||||
tools:text="@string/FORT" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -394,7 +406,7 @@
|
|||
android:layout_row="1"
|
||||
android:layout_column="0"
|
||||
android:id="@+id/REF"
|
||||
android:hint="@string/REF" />
|
||||
tools:text="@string/REF" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -405,7 +417,7 @@
|
|||
android:layout_row="1"
|
||||
android:layout_column="1"
|
||||
android:id="@+id/VOL"
|
||||
android:hint="@string/VOL" />
|
||||
tools:text="@string/VOL" />
|
||||
</GridLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
9
app/src/main/res/layout/activity_power_editor.xml
Normal file
9
app/src/main/res/layout/activity_power_editor.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="com.kauron.dungeonmanager.PowerEditor">
|
||||
|
||||
</RelativeLayout>
|
|
@ -2,29 +2,57 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="com.kauron.dungeonmanager.Welcome"
|
||||
android:orientation="vertical">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_character"
|
||||
android:id="@+id/newCharacter"
|
||||
android:onClick="onNewClick"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
tools:text="DungeonManager"
|
||||
android:id="@+id/title" />
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/load_character"
|
||||
android:id="@+id/loadCharacter"
|
||||
android:onClick="onLoadClick"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:orientation="vertical">
|
||||
<Button
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_character"
|
||||
android:id="@+id/newCharacter"
|
||||
android:onClick="onNewClick"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/load_character"
|
||||
android:id="@+id/loadCharacter"
|
||||
android:onClick="onLoadClick"/>
|
||||
|
||||
<ListView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/listView2"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,33 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Extra info"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/extra" />
|
||||
</LinearLayout>
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
tools:image="@drawable/delete"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView" />
|
||||
</LinearLayout>
|
||||
android:id="@+id/delete"
|
||||
android:src="@drawable/ic_delete"
|
||||
android:padding="5dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:contentDescription="@string/edit" />
|
||||
|
||||
<TextView
|
||||
tools:text="Happiness"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:id="@+id/name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Melee 1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/extra"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/keywords"
|
||||
tools:text="(fire, explosion)"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_alignBottom="@id/extra"
|
||||
android:layout_toRightOf="@+id/extra"
|
||||
android:layout_toEndOf="@+id/extra" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/frequency"
|
||||
android:layout_alignBottom="@+id/name"
|
||||
android:layout_toRightOf="@+id/name"
|
||||
android:layout_toEndOf="@+id/name"
|
||||
android:paddingLeft="10dp"
|
||||
tools:text="At will"/>
|
||||
|
||||
</RelativeLayout>
|
49
app/src/main/res/layout/player_row.xml
Normal file
49
app/src/main/res/layout/player_row.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
tools:text="Kauron"
|
||||
android:id="@+id/name"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
tools:text="Brujo Tiflin"
|
||||
android:id="@+id/other"
|
||||
android:layout_above="@+id/progressBar"
|
||||
android:layout_toRightOf="@+id/name"
|
||||
android:layout_toEndOf="@+id/name"
|
||||
android:paddingLeft="15dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
tools:text="LVL 1"
|
||||
android:id="@+id/level"
|
||||
android:layout_above="@+id/progressBar"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
</RelativeLayout>
|
Reference in a new issue