diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java b/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java index ab43f5a..3058248 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java @@ -33,22 +33,22 @@ // ImageButton16個の型を使いまわしやすいように配列で使用 imageButtons = new ImageButton[]{ - (ImageButton) view.findViewById(R.id.imageButton00), - (ImageButton) view.findViewById(R.id.imageButton01), - (ImageButton) view.findViewById(R.id.imageButton02), - (ImageButton) view.findViewById(R.id.imageButton03), + (ImageButton) view.findViewById(R.id.imageButton0), + (ImageButton) view.findViewById(R.id.imageButton1), + (ImageButton) view.findViewById(R.id.imageButton2), + (ImageButton) view.findViewById(R.id.imageButton3), + (ImageButton) view.findViewById(R.id.imageButton4), + (ImageButton) view.findViewById(R.id.imageButton5), + (ImageButton) view.findViewById(R.id.imageButton6), + (ImageButton) view.findViewById(R.id.imageButton7), + (ImageButton) view.findViewById(R.id.imageButton8), + (ImageButton) view.findViewById(R.id.imageButton9), (ImageButton) view.findViewById(R.id.imageButton10), (ImageButton) view.findViewById(R.id.imageButton11), (ImageButton) view.findViewById(R.id.imageButton12), (ImageButton) view.findViewById(R.id.imageButton13), - (ImageButton) view.findViewById(R.id.imageButton20), - (ImageButton) view.findViewById(R.id.imageButton21), - (ImageButton) view.findViewById(R.id.imageButton22), - (ImageButton) view.findViewById(R.id.imageButton23), - (ImageButton) view.findViewById(R.id.imageButton30), - (ImageButton) view.findViewById(R.id.imageButton31), - (ImageButton) view.findViewById(R.id.imageButton32), - (ImageButton) view.findViewById(R.id.imageButton33) + (ImageButton) view.findViewById(R.id.imageButton14), + (ImageButton) view.findViewById(R.id.imageButton15) }; // 16枚表示させるImage画像の配列 @@ -74,6 +74,7 @@ for(int i=0; i< imageButtons.length; i++) { imageButtons[i].setOnClickListener(this::onClick); imageButtons[i].setBackground(images[i]); + }; return view; diff --git a/app/src/main/java/org/ntlab/irisclient/TestDrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/TestDrawingActivity.java index 8cc4463..41b6090 100644 --- a/app/src/main/java/org/ntlab/irisclient/TestDrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/TestDrawingActivity.java @@ -58,7 +58,7 @@ System.out.println(t); } }); - */ + */ ((Iris) getApplication()).setRid("drawtest"); ((Iris) getApplication()).setNickname("owner"); Intent intent = new Intent(TestDrawingActivity.this,DrawingActivity.class); diff --git a/app/src/main/java/org/ntlab/irisclient/entities/GameJson.java b/app/src/main/java/org/ntlab/irisclient/entities/GameJson.java new file mode 100644 index 0000000..0a3bd58 --- /dev/null +++ b/app/src/main/java/org/ntlab/irisclient/entities/GameJson.java @@ -0,0 +1,28 @@ +package org.ntlab.irisclient.entities; + +import org.ntlab.irisclient.models.Cell; +import org.ntlab.irisclient.models.Drawing; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class GameJson { + + private Map drawingList = new HashMap<>();// + private List map = new ArrayList<>();//cno順にdnoを管理 + private List colorList = new ArrayList<>();//cno順にr,g,b,dを管理 + + //ゲッター + + public Map getDrawingList() {return drawingList;} + public List getMap() {return map;} + public List getColorList() {return colorList;} + + //セッター + public void setDrawingList(Map dlist) {drawingList = dlist;} + public void setMap(List map) {this.map = map;} + public void setColorList(List color) {this.colorList = color;} + +} diff --git a/app/src/main/java/org/ntlab/irisclient/models/Game.java b/app/src/main/java/org/ntlab/irisclient/models/Game.java index 7a769a1..3ae4a2d 100644 --- a/app/src/main/java/org/ntlab/irisclient/models/Game.java +++ b/app/src/main/java/org/ntlab/irisclient/models/Game.java @@ -11,13 +11,21 @@ private Map keywordList = new HashMap<>();// private Map cellList = new HashMap<>();// private List map = new ArrayList<>();//cno順にdnoを管理 - private List color = new ArrayList<>();//cno順にr,g,b,dを管理 + private List colorList = new ArrayList<>();//cno順にr,g,b,dを管理 + + //ゲッター + + public Map getDrawingList() {return drawingList;} + public Map getKeywordList() {return keywordList;} + public Map getCellList() {return cellList;} + public List getMap() {return map;} + public List getColorList() {return colorList;} //セッター - public void setDrawingList(Map dlist) {drawingList = dlist;} - public void setKeywordList(Map klist) {keywordList = klist;} - public void setCellList(Map clist) {cellList = clist;} - public void setMap(List map) {this.map = map;} - public void setColor(List color) {this.color = color;} + public void setDrawingList(Map dlist) {drawingList = dlist;} + public void setKeywordList(Map klist) {keywordList = klist;} + public void setCellList(Map clist) {cellList = clist;} + public void setMap(List map) {this.map = map;} + public void setColorList(List color) {this.colorList = color;} } diff --git a/app/src/main/res/layout/fragment_card_drawing.xml b/app/src/main/res/layout/fragment_card_drawing.xml index 171d5ea..1affc63 100644 --- a/app/src/main/res/layout/fragment_card_drawing.xml +++ b/app/src/main/res/layout/fragment_card_drawing.xml @@ -6,158 +6,356 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - + android:layout_centerVertical="true"> + + + - - - - - + android:layout_centerVertical="true"> + + + - - - - - - - + app:layout_constraintTop_toTopOf="parent" + android:layout_centerVertical="true"> + + + - - - - - - - - - + android:layout_centerVertical="true"> + + + - + android:layout_centerVertical="true"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file