• R/O
  • SSH
  • HTTPS

observoice: 提交


Commit MetaInfo

修訂329 (tree)
時間2012-11-23 15:52:50
作者tori-kawa

Log Message

改行コードをCR+LFからLFへ修正ならびに行末のスペースの削除。

Change Summary

差異

--- branches/29758-integrate-LectureListAdapter/observoice/AndroidManifest.xml (revision 328)
+++ branches/29758-integrate-LectureListAdapter/observoice/AndroidManifest.xml (revision 329)
@@ -1,36 +1,36 @@
1-<?xml version="1.0" encoding="utf-8"?>
2-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3- package="jp.sourceforge.observoice"
4- android:versionCode="1"
5- android:versionName="1.0" >
6-
7- <uses-sdk android:minSdkVersion="13" />
8-
9- <uses-permission android:name="android.permission.INTERNET" />
10-
11- <application
12- android:icon="@drawable/ic_observoice"
13- android:label="@string/app_name" android:theme="@style/Theme.observoice" android:name="jp.sourceforge.observoice.util.ObsvApplication">
14- <activity
15- android:name="jp.sourceforge.observoice.BootstrapActivity"
16- android:label="@string/app_name" >
17- <intent-filter>
18- <action android:name="android.intent.action.MAIN" />
19-
20- <category android:name="android.intent.category.LAUNCHER" />
21- </intent-filter>
22- </activity>
23- <activity android:name="jp.sourceforge.observoice.ObservoiceNetworkingSampleActivity" />
24- <activity android:name="jp.sourceforge.observoice.LoginActivity" />
25- <activity android:name="jp.sourceforge.observoice.StartActivity" />
26- <activity android:name="jp.sourceforge.observoice.LectureSearchActivity" />
27- <activity android:name="jp.sourceforge.observoice.LectureActivity" />
28- <activity android:name="jp.sourceforge.observoice.DebugActivity" />
29- <activity android:name="jp.sourceforge.observoice.ReviewLectureSearch" />
1+<?xml version="1.0" encoding="utf-8"?>
2+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+ package="jp.sourceforge.observoice"
4+ android:versionCode="1"
5+ android:versionName="1.0" >
6+
7+ <uses-sdk android:minSdkVersion="13" />
8+
9+ <uses-permission android:name="android.permission.INTERNET" />
10+
11+ <application
12+ android:icon="@drawable/ic_observoice"
13+ android:label="@string/app_name" android:theme="@style/Theme.observoice" android:name="jp.sourceforge.observoice.util.ObsvApplication">
14+ <activity
15+ android:name="jp.sourceforge.observoice.BootstrapActivity"
16+ android:label="@string/app_name" >
17+ <intent-filter>
18+ <action android:name="android.intent.action.MAIN" />
19+
20+ <category android:name="android.intent.category.LAUNCHER" />
21+ </intent-filter>
22+ </activity>
23+ <activity android:name="jp.sourceforge.observoice.ObservoiceNetworkingSampleActivity" />
24+ <activity android:name="jp.sourceforge.observoice.LoginActivity" />
25+ <activity android:name="jp.sourceforge.observoice.StartActivity" />
26+ <activity android:name="jp.sourceforge.observoice.LectureSearchActivity" />
27+ <activity android:name="jp.sourceforge.observoice.LectureActivity" />
28+ <activity android:name="jp.sourceforge.observoice.DebugActivity" />
29+ <activity android:name="jp.sourceforge.observoice.ReviewLectureSearch" />
3030 <activity android:name="jp.sourceforge.observoice.ChartEngineTestActivity" />
31- <activity android:name="jp.sourceforge.observoice.ReviewLectureActivity"></activity>
32- <activity android:name="jp.sourceforge.observoice.FragmentTestActivity" />
33- <activity android:name="jp.sourceforge.observoice.NicknameActivity"></activity>
34- </application>
35-
31+ <activity android:name="jp.sourceforge.observoice.ReviewLectureActivity"></activity>
32+ <activity android:name="jp.sourceforge.observoice.FragmentTestActivity" />
33+ <activity android:name="jp.sourceforge.observoice.NicknameActivity"></activity>
34+ </application>
35+
3636 </manifest>
\ No newline at end of file
--- branches/29758-integrate-LectureListAdapter/observoice/src/jp/sourceforge/observoice/adapter/LectureListAdapter.java (revision 328)
+++ branches/29758-integrate-LectureListAdapter/observoice/src/jp/sourceforge/observoice/adapter/LectureListAdapter.java (revision 329)
@@ -24,7 +24,8 @@
2424 private int ResourceId;
2525 private ArrayList<Course> items;
2626
27- public LectureListAdapter(Context context, int ResourceId, List<Course> lectureList) {
27+ public LectureListAdapter(Context context, int ResourceId,
28+ List<Course> lectureList) {
2829 super(context, ResourceId, lectureList);
2930 this.ResourceId = ResourceId;
3031 mLayoutInflater = (LayoutInflater) context
@@ -50,12 +51,16 @@
5051 if (convertView == null) {
5152 convertView = mLayoutInflater.inflate(ResourceId, null);
5253 holder = new ViewHolder();
53- holder.title = (TextView) convertView.findViewById(R.id.lecture_title);
54- holder.lecture_name = (TextView) convertView.findViewById(R.id.lecture_name);
54+ holder.title = (TextView) convertView
55+ .findViewById(R.id.lecture_title);
56+ holder.lecture_name = (TextView) convertView
57+ .findViewById(R.id.lecture_name);
5558 holder.teacher_name = (TextView) convertView
5659 .findViewById(R.id.teacher_name);
57- holder.lecture_schedule = (TextView) convertView.findViewById(R.id.lecture_schedule);
58- holder.lecture_year = (TextView) convertView.findViewById(R.id.lecture_year);
60+ holder.lecture_schedule = (TextView) convertView
61+ .findViewById(R.id.lecture_schedule);
62+ holder.lecture_year = (TextView) convertView
63+ .findViewById(R.id.lecture_year);
5964
6065 convertView.setTag(holder);
6166 } else {
@@ -75,31 +80,34 @@
7580 holder.title.setVisibility(View.GONE);
7681 holder.lecture_name.setText(item.getCourseTitle());
7782 holder.teacher_name.setText(item.getLecturers());
78-// if(item.checkScheduleExist()){
83+ // if(item.checkScheduleExist()){
7984 TimeSlot[] schedule = item.getSchedule();
80- if(schedule != null && item.getCourceId() > 0){
81- String scheduleString = "";
85+ if (schedule != null && item.getCourceId() > 0) {
86+ String scheduleString = "";
8287 int i;
8388 int printedDay = 0;
84- for(i = 0;i<schedule.length;i++){
89+ for (i = 0; i < schedule.length; i++) {
8590 TimeSlot timeSlot = schedule[i];
86- if(timeSlot.day() != printedDay){
87- if(printedDay>0){
91+ if (timeSlot.day() != printedDay) {
92+ if (printedDay > 0) {
8893 scheduleString += " ";
8994 }
90- scheduleString += convertLectureDay(timeSlot.day()) + String.valueOf(timeSlot.period()) + "限";
95+ scheduleString += convertLectureDay(timeSlot.day())
96+ + String.valueOf(timeSlot.period()) + "限";
9197 printedDay = timeSlot.day();
92- }else{
93- scheduleString += ","+String.valueOf(timeSlot.period()) + "限";
98+ } else {
99+ scheduleString += ","
100+ + String.valueOf(timeSlot.period()) + "限";
94101 }
95102 }
96103 holder.lecture_schedule.setText(scheduleString);
97- }else{
104+ } else {
98105 holder.lecture_schedule.setText("");
99106 }
100- if(item.getYear() != 0){
101- holder.lecture_year.setText(String.valueOf(item.getYear())+"年度");
102- }else{
107+ if (item.getYear() != 0) {
108+ holder.lecture_year.setText(String.valueOf(item.getYear())
109+ + "年度");
110+ } else {
103111 holder.lecture_year.setText("");
104112 }
105113 }
@@ -115,9 +123,9 @@
115123 public TextView lecture_schedule;
116124 public TextView lecture_year;
117125 }
118-
119- private String convertLectureDay(int lecture_day){
120- switch(lecture_day){
126+
127+ private String convertLectureDay(int lecture_day) {
128+ switch (lecture_day) {
121129 case 1:
122130 return "日曜日";
123131 case 2:
--- branches/29758-integrate-LectureListAdapter/observoice/src/jp/sourceforge/observoice/entity/Course.java (revision 328)
+++ branches/29758-integrate-LectureListAdapter/observoice/src/jp/sourceforge/observoice/entity/Course.java (revision 329)
@@ -8,17 +8,15 @@
88
99 /**
1010 * 講義情報を表すクラス
11- *
11+ *
1212 * @author kubokawa uchan_nos sety007
13- *
13+ *
1414 */
1515 public class Course implements Serializable {
1616 private static final long serialVersionUID = 1L;
1717
1818 /*
19- * 講義に関する各種の値
20- * http://[hostname]/api/courses/watching.json
21- * のレスポンスに対応している
19+ * 講義に関する各種の値 http://[hostname]/api/courses/watching.json のレスポンスに対応している
2220 */
2321 private int courseId;
2422 private String courseTitle;
@@ -30,13 +28,13 @@
3028 private int commentCount;
3129 private String url;
3230
33- //LectureInfoクラス統合時における整合性保持のための変数
34- //CourseはTimeSlotであり、LecturerInfoはStringの変数だった
31+ // LectureInfoクラス統合時における整合性保持のための変数
32+ // CourseはTimeSlotであり、LecturerInfoはStringの変数だった
3533 private String lecture_period;
36-
37- public Course(int courceId, String courceTitle, String[] lecturer, int year,
38- String semester, TimeSlot[] schedule, String lecture_period, String location,
39- int commentCount, String url) {
34+
35+ public Course(int courceId, String courceTitle, String[] lecturer,
36+ int year, String semester, TimeSlot[] schedule,
37+ String lecture_period, String location, int commentCount, String url) {
4038 this.courseId = courceId;
4139 this.courseTitle = courceTitle;
4240 this.lecturer = lecturer;
@@ -49,8 +47,8 @@
4947 this.url = url;
5048 }
5149
52- //LectureInfoが呼ばれたとき用のコンストラクタ
53- public Course(){
50+ // LectureInfoが呼ばれたとき用のコンストラクタ
51+ public Course() {
5452 this.courseId = 0;
5553 this.courseTitle = "";
5654 this.lecturer = null;
@@ -62,9 +60,9 @@
6260 this.commentCount = 0;
6361 this.url = "";
6462 }
65-
66- //StartActivityでTitle用に使うためのコンストラクタ
67- public Course(int courseId, String title){
63+
64+ // StartActivityでTitle用に使うためのコンストラクタ
65+ public Course(int courseId, String title) {
6866 this.courseId = courseId;
6967 this.courseTitle = title;
7068 this.lecturer = null;
@@ -76,10 +74,10 @@
7674 this.commentCount = 0;
7775 this.url = "";
7876 }
79-
77+
8078 /**
8179 * JSONオブジェクトをパースして講義情報オブジェクトを返す
82- *
80+ *
8381 * @param json
8482 * @return
8583 * @throws JSONException
@@ -94,29 +92,29 @@
9492 TimeSlot[] schedule = new TimeSlot[scheduleJson.length()];
9593 String url = json.getString("infoUrl");
9694 String period = "";
97-
98- if(scheduleJson.length()>0){
95+
96+ if (scheduleJson.length() > 0) {
9997 schedule[0] = TimeSlot.parse(scheduleJson.getJSONObject(0));
100- period = String.valueOf(scheduleJson.getJSONObject(0).getInt("period"));
101- for (int i = 1; i < schedule.length; i++) {
102- schedule[i] = TimeSlot.parse(scheduleJson.getJSONObject(i));
103- period += "," + String.valueOf(scheduleJson.getJSONObject(i).getInt("period"));
104- }
98+ period = String.valueOf(scheduleJson.getJSONObject(0).getInt(
99+ "period"));
100+ for (int i = 1; i < schedule.length; i++) {
101+ schedule[i] = TimeSlot.parse(scheduleJson.getJSONObject(i));
102+ period += ","
103+ + String.valueOf(scheduleJson.getJSONObject(i).getInt(
104+ "period"));
105+ }
105106 }
106107 String location = json.getString("location");
107108 int commentCount = json.getInt("commentCount");
108-
109109
110110 String[] lecturers = new String[lecturersJson.length()];
111111
112- for (int i = 0; i < lecturersJson.length(); i++){
113- lecturers[i] = lecturersJson.getString(i);
112+ for (int i = 0; i < lecturersJson.length(); i++) {
113+ lecturers[i] = lecturersJson.getString(i);
114114 }
115115
116- return new Course(
117- courceId, courceTitle, lecturers,
118- year, semester, schedule, period,
119- location, commentCount, url);
116+ return new Course(courceId, courceTitle, lecturers, year, semester,
117+ schedule, period, location, commentCount, url);
120118 }
121119
122120 public int getCourceId() {
@@ -128,17 +126,17 @@
128126 }
129127
130128 public String getLecturers() {
131- String ret = "";
132-
133- if(lecturer!=null&&lecturer.length>0){
134- ret = lecturer[0];
135- for(int i = 1; i < lecturer.length; i++){
136- ret += "," + lecturer[i];
137- }
138- }
129+ String ret = "";
130+
131+ if (lecturer != null && lecturer.length > 0) {
132+ ret = lecturer[0];
133+ for (int i = 1; i < lecturer.length; i++) {
134+ ret += "," + lecturer[i];
135+ }
136+ }
139137 return ret;
140138 }
141-
139+
142140 public String[] getLecturersArray() {
143141 return lecturer;
144142 }
@@ -154,7 +152,6 @@
154152 public TimeSlot[] getSchedule() {
155153 return schedule;
156154 }
157-
158155
159156 public String getLocation() {
160157 return location;
@@ -163,13 +160,13 @@
163160 public int getCommentCount() {
164161 return commentCount;
165162 }
166-
167- public String getUrl(){
168- return url;
163+
164+ public String getUrl() {
165+ return url;
169166 }
170-
171- //以下LectureInfoとの整合性保持のためのメソッド群
172- public String getPeriod(){
173- return lecture_period;
167+
168+ // 以下LectureInfoとの整合性保持のためのメソッド群
169+ public String getPeriod() {
170+ return lecture_period;
174171 }
175172 }
\ No newline at end of file
--- branches/29758-integrate-LectureListAdapter/observoice/res/values/strings.xml (revision 328)
+++ branches/29758-integrate-LectureListAdapter/observoice/res/values/strings.xml (revision 329)
@@ -1,90 +1,89 @@
1-<?xml version="1.0" encoding="utf-8"?>
2-<resources>
3-
4- <string name="shared_preferences_filename">obsv</string>
5-
6- <string name="hello">Hello World, ObservoiceActivity!</string>
7- <string name="app_name">observoice</string>
8- <string name="text">test</string>
9- <string name="searchlecture">講義を探す</string>
10- <string name="review">復習する</string>
11- <string name="understand">わかった!</string>
12- <string name="dontunderstand">わからん!</string>
13- <string name="watch_alert_title">ウォッチ情報</string>
14- <string name="watch_alert_watch_or_not">この授業をウォッチしますか?</string>
15- <string name="yes">はい</string>
16- <string name="no">いいえ</string>
17- <string name="watch_alert_already_watching">この授業はすでにウォッチしています</string>
18- <string name="showLectureDetail">詳細</string>
19- <string name="detail_alert_title">講義詳細</string>
20- <string name="detail_alert_show_or_not">この授業の詳細ページを表示しますか?</string>
21- <string name="lecture_comment_hint">ここにコメントを入力してください</string>
22- <string name="LectureSearch_period_label">時限</string>
23- <string name="LectureSearch_day_label">曜日</string>
24- <string name="LectureSearch_free_word_label">フリーワード</string>
25- <string name="LectureSearch_free_word"></string>
26- <string name="LectureSearch_free_word_hint">講義名の一部</string>
27- <string name="lecture_search_past_lecture_show_or_not_label">昨年度以前の授業を表示する</string>
28- <string name="LectureSearch_search_label">検索</string>
29- <string name="LectureSearch_start_label">GO</string>
30- <string name="retry">リトライ</string>
31- <string name="exit">終了</string>
32- <string name="login_path">/web/login</string>
33- <string name="login_connect_failed">サーバに接続できませんでした</string>
34- <string name="login_host_lookup_failed">ホスト名を解決できませんでした</string>
35-
36- <string-array name="lectureDayOfWeek">
37- <item>曜日指定なし</item>
38- <item>月曜日</item>
39- <item>火曜日</item>
40- <item>水曜日</item>
41- <item>木曜日</item>
42- <item>金曜日</item>
43- <item>土曜日</item>
44- <item>日曜日</item>
45- </string-array>
46- <string-array name="lectureTimeSlots">
47- <item>時限指定なし</item>
48- <item>1時限</item>
49- <item>2時限</item>
50- <item>3時限</item>
51- <item>4時限</item>
52- <item>5時限</item>
53- <item>6時限</item>
54- <item>7時限</item>
55- <item>8時限</item>
56- <item>9時限</item>
57- <item>10時限</item>
58- </string-array>
59-
60- <string name="require_api_key">APIキーをここにコピーしてください</string>
61- <string name="ok">OK</string>
62- <string name="postCommentSuccessfulMessage">コメント投稿が成功しました</string>
63-
64- <string name="jsonResponseParseErrorMessage">サーバからのレスポンスがただしくないようです</string>
65-
66-
67- <!-- デバッグ画面用 -->
68- <string name="get_comments">コメントの一覧を取得する</string>
69- <string name="get_courses">講義情報の一覧を取得する</string>
70- <string name="get_course">講義情報を取得する</string>
71- <string name="get_current_courses">現在開講している講義情報の一覧を取得する</string>
72- <string name="post_comment">コメントを投稿する</string>
73- <string name="debug">デバッグ</string>
74- <string name="remote_api_key">APIキーを削除する</string>
1+<?xml version="1.0" encoding="utf-8"?>
2+<resources>
3+
4+ <string name="shared_preferences_filename">obsv</string>
5+ <string name="hello">Hello World, ObservoiceActivity!</string>
6+ <string name="app_name">observoice</string>
7+ <string name="text">test</string>
8+ <string name="searchlecture">講義を探す</string>
9+ <string name="review">復習する</string>
10+ <string name="understand">わかった!</string>
11+ <string name="dontunderstand">わからん!</string>
12+ <string name="watch_alert_title">ウォッチ情報</string>
13+ <string name="watch_alert_watch_or_not">この授業をウォッチしますか?</string>
14+ <string name="yes">はい</string>
15+ <string name="no">いいえ</string>
16+ <string name="watch_alert_already_watching">この授業はすでにウォッチしています</string>
17+ <string name="showLectureDetail">詳細</string>
18+ <string name="detail_alert_title">講義詳細</string>
19+ <string name="detail_alert_show_or_not">この授業の詳細ページを表示しますか?</string>
20+ <string name="lecture_comment_hint">ここにコメントを入力してください</string>
21+ <string name="LectureSearch_period_label">時限</string>
22+ <string name="LectureSearch_day_label">曜日</string>
23+ <string name="LectureSearch_free_word_label">フリーワード</string>
24+ <string name="LectureSearch_free_word"></string>
25+ <string name="LectureSearch_free_word_hint">講義名の一部</string>
26+ <string name="lecture_search_past_lecture_show_or_not_label">昨年度以前の授業を表示する</string>
27+ <string name="LectureSearch_search_label">検索</string>
28+ <string name="LectureSearch_start_label">GO</string>
29+ <string name="retry">リトライ</string>
30+ <string name="exit">終了</string>
31+ <string name="login_path">/web/login</string>
32+ <string name="login_connect_failed">サーバに接続できませんでした</string>
33+ <string name="login_host_lookup_failed">ホスト名を解決できませんでした</string>
34+
35+ <string-array name="lectureDayOfWeek">
36+ <item>曜日指定なし</item>
37+ <item>月曜日</item>
38+ <item>火曜日</item>
39+ <item>水曜日</item>
40+ <item>木曜日</item>
41+ <item>金曜日</item>
42+ <item>土曜日</item>
43+ <item>日曜日</item>
44+ </string-array>
45+ <string-array name="lectureTimeSlots">
46+ <item>時限指定なし</item>
47+ <item>1時限</item>
48+ <item>2時限</item>
49+ <item>3時限</item>
50+ <item>4時限</item>
51+ <item>5時限</item>
52+ <item>6時限</item>
53+ <item>7時限</item>
54+ <item>8時限</item>
55+ <item>9時限</item>
56+ <item>10時限</item>
57+ </string-array>
58+
59+ <string name="require_api_key">APIキーをここにコピーしてください</string>
60+ <string name="ok">OK</string>
61+ <string name="postCommentSuccessfulMessage">コメント投稿が成功しました</string>
62+ <string name="jsonResponseParseErrorMessage">サーバからのレスポンスがただしくないようです</string>
63+
64+ <!-- デバッグ画面用 -->
65+ <string name="get_comments">コメントの一覧を取得する</string>
66+ <string name="get_courses">講義情報の一覧を取得する</string>
67+ <string name="get_course">講義情報を取得する</string>
68+ <string name="get_current_courses">現在開講している講義情報の一覧を取得する</string>
69+ <string name="post_comment">コメントを投稿する</string>
70+ <string name="debug">デバッグ</string>
71+ <string name="remote_api_key">APIキーを削除する</string>
7572 <string name="restart">再起動する</string>
76-
7773 <string name="status400_message">400 Bad Request - パラメータが不正です</string>
78- <string name="status403_message">403 Forbidden - サーバが要求の実行を拒否しています</string><string name="status404_message">404 Not Found - 接続先が存在しません</string>
79- <string name="status500_message">500 Internal Server Error - サーバで問題が発生しています</string><string name="http_response_error_message">サーバからエラーコードが返されました</string><string name="http_connection_error_message">サーバーと接続できません。時間をおいて再度試してください。</string>
80- <string name="watchLecture">ウォッチ</string>
81- <string name="get_watching_courses">ウォッチ一覧取得</string>
82- <string name="debug_please_select_from_option">他のデバッグメニューは右上のメニューから選べます</string>
83- <string name="review_day_selecter_label_string">日付:</string>
84- <string name="review_day_begin">から</string>
85- <string name="review_day_end">まで</string>
86- <string name="get_account">アカウント情報取得><</string>
87- <string name="nickname_menu_title">ニックネーム変更</string>
88- <string name="nickname_path">/web/user/userinfo</string>
89-
74+ <string name="status403_message">403 Forbidden - サーバが要求の実行を拒否しています</string>
75+ <string name="status404_message">404 Not Found - 接続先が存在しません</string>
76+ <string name="status500_message">500 Internal Server Error - サーバで問題が発生しています</string>
77+ <string name="http_response_error_message">サーバからエラーコードが返されました</string>
78+ <string name="http_connection_error_message">サーバーと接続できません。時間をおいて再度試してください。</string>
79+ <string name="watchLecture">ウォッチ</string>
80+ <string name="get_watching_courses">ウォッチ一覧取得</string>
81+ <string name="debug_please_select_from_option">他のデバッグメニューは右上のメニューから選べます</string>
82+ <string name="review_day_selecter_label_string">日付:</string>
83+ <string name="review_day_begin">から</string>
84+ <string name="review_day_end">まで</string>
85+ <string name="get_account">アカウント情報取得><</string>
86+ <string name="nickname_menu_title">ニックネーム変更</string>
87+ <string name="nickname_path">/web/user/userinfo</string>
88+
9089 </resources>
\ No newline at end of file
Show on old repository browser