Skip to content

Commit

Permalink
うごくかんせいひん!
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-24v committed Nov 7, 2015
1 parent cc5f370 commit 6375dba
Show file tree
Hide file tree
Showing 30 changed files with 372 additions and 41 deletions.
12 changes: 12 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
14 changes: 11 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joken.survey2015"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />

android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
Expand All @@ -24,6 +24,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PropatyActivity"
android:label="@string/title_activity_propaty"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.joken.survey2015.MainActivity" />
</activity>
</application>

</manifest>
14 changes: 11 additions & 3 deletions bin/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joken.survey2015"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />

android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
Expand All @@ -24,6 +24,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PropatyActivity"
android:label="@string/title_activity_propaty"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.joken.survey2015.MainActivity" />
</activity>
</application>

</manifest>
Binary file modified bin/Survey2015.apk
Binary file not shown.
Binary file modified bin/classes.dex
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/MainActivity$1.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/MainActivity$2.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/MainActivity.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$array.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$attr.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$color.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$dimen.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$drawable.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$id.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$layout.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$menu.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$string.class
Binary file not shown.
Binary file modified bin/classes/com/joken/survey2015/R$style.class
Binary file not shown.
Binary file modified bin/resources.ap_
Binary file not shown.
38 changes: 26 additions & 12 deletions gen/com/joken/survey2015/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

public final class R {
public static final class array {
public static final int quest_day1=0x7f040001;
public static final int quest_day2=0x7f040002;
public static final int day_list=0x7f040001;
public static final int quest_day1=0x7f040002;
public static final int quest_day2=0x7f040003;
public static final int sex_list=0x7f040000;
}
public static final class attr {
Expand All @@ -37,51 +38,64 @@ public static final class drawable {
public static final class id {
public static final int TextView01=0x7f0a000c;
public static final int TextView02=0x7f0a000e;
public static final int action_settings=0x7f0a0016;
public static final int answerBar=0x7f0a0015;
public static final int item=0x7f0a0012;
public static final int action_settings=0x7f0a001b;
public static final int answerBar=0x7f0a001a;
public static final int day_spinner=0x7f0a0012;
public static final int id_edit=0x7f0a0013;
public static final int id_enter_button=0x7f0a0014;
public static final int item=0x7f0a0017;
public static final int myagearea=0x7f0a0005;
public static final int mysexarea=0x7f0a000d;
public static final int namearea=0x7f0a0002;
public static final int questList=0x7f0a0011;
public static final int questText=0x7f0a0014;
public static final int questList=0x7f0a0010;
public static final int questText=0x7f0a0019;
public static final int questcount_edit=0x7f0a0015;
public static final int questcount_enter_button=0x7f0a0016;
public static final int tableLayout1=0x7f0a0000;
public static final int tableRow1=0x7f0a0001;
public static final int tableRow2=0x7f0a0003;
public static final int tableRow3=0x7f0a0006;
public static final int tableRow4=0x7f0a000b;
public static final int text1=0x7f0a0013;
public static final int text1=0x7f0a0018;
public static final int textView1=0x7f0a0004;
public static final int textView2=0x7f0a0009;
public static final int textView3=0x7f0a0007;
public static final int textView4=0x7f0a0010;
public static final int textView4=0x7f0a0011;
public static final int tgtagearea1=0x7f0a0008;
public static final int tgtagearea2=0x7f0a000a;
public static final int tgtsexarea=0x7f0a000f;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int dropdown_list=0x7f030001;
public static final int list=0x7f030002;
public static final int questitem=0x7f030003;
public static final int activity_propaty=0x7f030001;
public static final int dropdown_list=0x7f030002;
public static final int list=0x7f030003;
public static final int questitem=0x7f030004;
}
public static final class menu {
public static final int main=0x7f090000;
public static final int propaty=0x7f090001;
}
public static final class string {
public static final int action_settings=0x7f060001;
public static final int app_name=0x7f060000;
public static final int day_prop=0x7f06000f;
public static final int dialog_defmsg=0x7f06000b;
public static final int dialog_no=0x7f06000a;
public static final int dialog_ok=0x7f060009;
public static final int exp_success_tit=0x7f06000c;
public static final int from=0x7f060007;
public static final int hello_propaty=0x7f06000e;
public static final int id_prop=0x7f060010;
public static final int myage=0x7f060004;
public static final int mysex=0x7f060003;
public static final int name=0x7f060002;
public static final int prop_enter=0x7f060011;
public static final int questcount_prop=0x7f060012;
public static final int summary=0x7f060008;
public static final int tgtage=0x7f060006;
public static final int tgtsex=0x7f060005;
public static final int title_activity_propaty=0x7f06000d;
}
public static final class style {
/**
Expand Down
6 changes: 6 additions & 0 deletions lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="CommitPrefEdits">
<ignore path="src/com/joken/survey2015/PropatyActivity.java" />
</issue>
</lint>
Binary file added release.keystore
Binary file not shown.
19 changes: 10 additions & 9 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,6 @@
</TableRow>
</TableLayout>

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/tableLayout1"
android:layout_below="@+id/tableLayout1"
android:text="@string/summary"
android:textColor="@color/black" />

<ExpandableListView
android:id="@+id/questList"
android:layout_width="match_parent"
Expand All @@ -162,5 +153,15 @@
android:layout_below="@+id/textView4" >
</ExpandableListView>

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/questList"
android:layout_below="@+id/tableLayout1"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:text="@string/summary"
android:textColor="@color/black" />

</RelativeLayout>
101 changes: 101 additions & 0 deletions res/layout/activity_propaty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.joken.survey2015.PropatyActivity" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="vertical" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_propaty"
android:layout_marginBottom="20dp"
android:textAppearance="?android:attr/textAppearanceLarge" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/day_prop" />

<Spinner
android:id="@+id/day_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/id_prop" />

<EditText
android:id="@+id/id_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="number" >

<requestFocus />
</EditText>

<Button
android:id="@+id/id_enter_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/prop_enter" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/questcount_prop" />

<EditText
android:id="@+id/questcount_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="number" />

<Button
android:id="@+id/questcount_enter_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/prop_enter" />

</LinearLayout>

</LinearLayout>

</RelativeLayout>
11 changes: 11 additions & 0 deletions res/menu/propaty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.joken.survey2015.PropatyActivity" >

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

</menu>
5 changes: 5 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<item>おんなのこ</item>
</string-array>

<string-array name="day_list">
<item>1にちめ</item>
<item>2にちめ</item>
</string-array>

<string-array name="quest_day1">
<item>自分は逃げ腰だ</item>
<item>みんながやるものは自分もやる。</item>
Expand Down
30 changes: 18 additions & 12 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">恋人探しアンケート2015</string>
<string name="action_settings">Settings</string>
<string name="name">おなまえ</string>
<string name="mysex">じぶんの性別</string>
<string name="myage">じぶんの年齢</string>
<string name="tgtsex">あいての性別</string>
<string name="tgtage">あいての年齢(最小~最大)</string>
<string name="from">~</string>
<string name="summary">全くそう思わない(星1)~とてもそう思う(星5)の5段階で回答してください</string>
<string name="dialog_ok">いいよ</string>
<string name="dialog_no">Noooooo!</string>
<string name="action_settings">Settings</string>
<string name="name">おなまえ</string>
<string name="mysex">じぶんの性別</string>
<string name="myage">じぶんの年齢</string>
<string name="tgtsex">あいての性別</string>
<string name="tgtage">あいての年齢(最小~最大)</string>
<string name="from">~</string>
<string name="summary">全くそう思わない(星1)~とてもそう思う(星5)の5段階で回答してください</string>
<string name="dialog_ok">いいよ</string>
<string name="dialog_no">Noooooo!</string>
<string name="dialog_defmsg">これでok?</string>
<string name="exp_success_tit">入力せいこう!</string>
<string name="exp_success_tit">入力せいこう!</string>
<string name="title_activity_propaty">ぷろぱてぃ</string>
<string name="hello_propaty">Preferenceのあたいをいじるよ(関係者がさわってね!!!)</string>
<string name="day_prop">なんにちめ?</string>
<string name="id_prop">SaveされるIDは?</string>
<string name="prop_enter">適用</string>
<string name="questcount_prop">1こうもくのもんだいすうは?</string>

</resources>
29 changes: 29 additions & 0 deletions src/com/joken/survey2015/CollectionUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.joken.survey2015;

import java.util.ArrayList;

public class CollectionUtils {

/**
* ArrayListを指定したサイズ毎に分割します。
*
* @param origin 分割元のArrayList
* @param size ArrayListの分割単位
* @return サイズ毎に分割されたArrayArrayList。但し、ArrayListがnullまたは空の場合、もしくはsizeが0以下の場合は空のArrayListを返す。
*/
public static <T> ArrayList<ArrayList<T>> devide(ArrayList<T> origin, int size) {
if (origin == null || origin.isEmpty() || size <= 0) {
return new ArrayList<ArrayList<T>>(0);
}

int block = origin.size() / size + (origin.size() % size > 0 ? 1 : 0 );

ArrayList<ArrayList<T>> devidedList = new ArrayList<ArrayList<T>>(block);
for (int i = 0; i < block; i ++) {
int start = i * size;
int end = Math.min(start + size, origin.size());
devidedList.add(new ArrayList<T>(origin.subList(start, end)));
}
return devidedList;
}
}
Loading

0 comments on commit 6375dba

Please sign in to comment.