1 |
|
package com.dreamcatcher.bicycle.util; |
2 |
|
|
3 |
|
import com.dreamcatcher.bicycle.R; |
4 |
|
import com.dreamcatcher.bicycle.activity.AppInfo; |
5 |
|
import com.dreamcatcher.bicycle.activity.BicycleList; |
6 |
|
import com.dreamcatcher.bicycle.activity.BicycleMap; |
7 |
|
import com.dreamcatcher.bicycle.activity.BicycleMore; |
8 |
|
import com.dreamcatcher.bicycle.activity.BicycleSetting; |
9 |
|
import com.dreamcatcher.bicycle.activity.ChangeCityActivity; |
10 |
|
import com.dreamcatcher.bicycle.activity.FavoriteSettingActivity; |
11 |
|
import com.dreamcatcher.bicycle.activity.FeedbackActivity; |
12 |
|
import com.dreamcatcher.bicycle.activity.MapSettingActivity; |
13 |
|
|
14 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
15 |
|
public class Constants { |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
16 |
|
public interface TabSetting{ |
17 |
|
int IMAGE_ARRAY[] = {R.drawable.ic_tab_bicycle, |
18 |
|
R.drawable.ic_tab_list, |
19 |
|
R.drawable.ic_tab_setting, |
20 |
|
R.drawable.ic_tab_more |
21 |
|
}; |
22 |
|
int TEXT_ARRAY[] = {R.string.tab_map, |
23 |
|
R.string.tab_list, |
24 |
|
R.string.tab_settings, |
25 |
|
R.string.tab_more |
26 |
|
}; |
27 |
|
@SuppressWarnings("rawtypes") |
28 |
|
Class CONTENT_ARRAY[] = {BicycleMap.class, |
29 |
|
BicycleList.class, |
30 |
|
BicycleSetting.class, |
31 |
|
BicycleMore.class |
32 |
|
}; |
33 |
|
|
34 |
|
} |
35 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
36 |
|
public interface CitySetting{ |
37 |
|
String CITY_SETTING_FILENAME = "setting/citysetting.json"; |
38 |
|
String CITY_TAG[] = {"suzhou", "changshu", "kunshan", "nantong", "wujiang", "zhongshan", "shaoxing", |
39 |
|
"wuhan", "fuzhou", "hangzhou", "heihe"}; |
40 |
|
int CITY_NAME_RESID[] = { |
41 |
|
R.string.city_name_suzhou, |
42 |
|
R.string.city_name_changshu, |
43 |
|
R.string.city_name_kunshan, |
44 |
|
R.string.city_name_nantong, |
45 |
|
R.string.city_name_wujiang, |
46 |
|
R.string.city_name_zhongshan, |
47 |
|
R.string.city_name_shaoxing, |
48 |
|
R.string.city_name_wuhan, |
49 |
|
R.string.city_name_fuzhou, |
50 |
|
R.string.city_name_hangzhou, |
51 |
|
R.string.city_name_heihe |
52 |
|
}; |
53 |
|
int CITY_MAP_ID[] = { |
54 |
|
224, |
55 |
|
2113, |
56 |
|
2581, |
57 |
|
161, |
58 |
|
2284, |
59 |
|
187, |
60 |
|
293, |
61 |
|
218, |
62 |
|
300, |
63 |
|
179, |
64 |
|
39 |
65 |
|
}; |
66 |
|
} |
67 |
|
|
68 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
69 |
|
public interface HttpSetting{ |
70 |
|
String HTTP_CONT_ENCODE = "UTF-8"; |
71 |
|
} |
72 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
73 |
|
public interface BicycleJsonTag{ |
74 |
|
String STATION = "station"; |
75 |
|
String ID = "id"; |
76 |
|
String NAME = "name"; |
77 |
|
String LATITUDE = "lat"; |
78 |
|
String LONGITUDE = "lng"; |
79 |
|
String CAPACITY = "capacity"; |
80 |
|
String AVAIABLE = "availBike"; |
81 |
|
String ADDRESS = "address"; |
82 |
|
} |
83 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
84 |
|
public interface SettingJsonTag{ |
85 |
|
String TABS = "tabs"; |
86 |
|
String ALL_BICYCLES_URL = "allBicyclesUrl"; |
87 |
|
String BICYCLE_DETAIL_URL= "bicycleDetailUrl"; |
88 |
|
String DEFAULT_LATITUDE = "defaultLatitude"; |
89 |
|
String DEFAULT_LONGITUDE= "defaultLongitude"; |
90 |
|
String OFFSET_LATITUDE= "offsetLatitude"; |
91 |
|
String OFFSET_LONGITUDE= "offsetLongitude"; |
92 |
|
String ASSETS_FILE_NAME= "assetsFileName"; |
93 |
|
String SHOW_BICYCLE_NUMBER = "showBicycleNumber"; |
94 |
|
String REFRESH_SINGLE = "refreshSingle"; |
95 |
|
String NEED_DECODE = "needDecode"; |
96 |
|
String DEFAULT_ZOOM = "defaultZoom"; |
97 |
|
} |
98 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
99 |
|
public interface LocalStoreTag{ |
100 |
|
String ALL_BICYCLE = "all_bicycle"; |
101 |
|
String CITY_NAME = "city_name"; |
102 |
|
String AUTO_LOCATE_ON_STARTUP = "auto_locate"; |
103 |
|
String SHOW_NEAREST_SPOTS = "show_nearest_spot"; |
104 |
|
String SHOW_FAVORITE_SPOTS = "show_favorite_spots"; |
105 |
|
String FAVORITE_IDS = "favorite_ids"; |
106 |
|
String OFFLINE_MAP_PERCENTAGE = "offline_map_percentage"; |
107 |
|
String NEXT_AD_SHOWN_TIME = "next_ad_shown_time"; |
108 |
|
} |
109 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
110 |
|
public interface IntentExtraTag{ |
111 |
|
String MAIN_REMINDER_FROM_NOTIFICATION = "is_from_reminder_notifaction"; |
112 |
|
} |
113 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
114 |
|
public interface BaiduApi{ |
115 |
|
String KEY = "59CC96DE7DFC977509A4F484D9E48D6B66E6FBCA"; |
116 |
|
} |
117 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
118 |
|
public interface SettingListViewItem{ |
119 |
|
int[] SETTING_ITEM_IMAGE = { |
120 |
|
R.drawable.ic_setting_map, |
121 |
|
R.drawable.ic_setting_changecity, |
122 |
|
R.drawable.ic_setting_favorite, |
123 |
|
R.drawable.ic_reminder, |
124 |
|
R.drawable.ic_setting_recommend |
125 |
|
}; |
126 |
|
String[] SETTING_ITEM_TEXT = { |
127 |
|
Utils.getText(R.string.setting_map), |
128 |
|
Utils.getText(R.string.setting_changecity), |
129 |
|
Utils.getText(R.string.setting_favorite), |
130 |
|
Utils.getText(R.string.setting_return_reminder), |
131 |
|
Utils.getText(R.string.setting_recommend) |
132 |
|
}; |
133 |
|
int SETTING_ITEM_NEXT_INDICATOR = R.drawable.ic_setting_next_indicator; |
134 |
|
|
135 |
|
@SuppressWarnings("rawtypes") |
136 |
|
Class NEXT_ACTIVITY_ARRAY[] = { |
137 |
|
MapSettingActivity.class, |
138 |
|
ChangeCityActivity.class, |
139 |
|
FavoriteSettingActivity.class, |
140 |
|
null, |
141 |
|
null, |
142 |
|
}; |
143 |
|
|
144 |
|
int[] MARGIN_TOP_IN_DIP = { |
145 |
|
0, |
146 |
|
-1, |
147 |
|
-1, |
148 |
|
-1, |
149 |
|
-1 |
150 |
|
}; |
151 |
|
|
152 |
|
int[] BACKGROUND_IMAGE ={ |
153 |
|
R.drawable.setting_listitem_bg_top, |
154 |
|
R.drawable.setting_listitem_bg_middle, |
155 |
|
R.drawable.setting_listitem_bg_middle, |
156 |
|
R.drawable.setting_listitem_bg_middle, |
157 |
|
R.drawable.setting_listitem_bg_bottom |
158 |
|
}; |
159 |
|
} |
160 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
161 |
|
public interface MoreListviewItem{ |
162 |
|
int[] SETTING_ITEM_IMAGE = { |
163 |
|
R.drawable.ic_setting_feedback, |
164 |
|
R.drawable.ic_setting_share, |
165 |
|
R.drawable.ic_setting_update, |
166 |
|
R.drawable.ic_setting_rating, |
167 |
|
R.drawable.ic_setting_about |
168 |
|
}; |
169 |
|
String[] SETTING_ITEM_TEXT = { |
170 |
|
Utils.getText(R.string.setting_feedback), |
171 |
|
Utils.getText(R.string.setting_share), |
172 |
|
Utils.getText(R.string.setting_update), |
173 |
|
Utils.getText(R.string.setting_rating), |
174 |
|
Utils.getText(R.string.setting_about) |
175 |
|
}; |
176 |
|
int SETTING_ITEM_NEXT_INDICATOR = R.drawable.ic_setting_next_indicator; |
177 |
|
|
178 |
|
@SuppressWarnings("rawtypes") |
179 |
|
Class NEXT_ACTIVITY_ARRAY[] = { |
180 |
|
FeedbackActivity.class, |
181 |
|
null, |
182 |
|
null, |
183 |
|
null, |
184 |
|
AppInfo.class |
185 |
|
}; |
186 |
|
|
187 |
|
int[] MARGIN_TOP_IN_DIP = { |
188 |
|
0, |
189 |
|
-1, |
190 |
|
-1, |
191 |
|
-1, |
192 |
|
-1 |
193 |
|
}; |
194 |
|
|
195 |
|
int[] BACKGROUND_IMAGE ={ |
196 |
|
R.drawable.setting_listitem_bg_top, |
197 |
|
R.drawable.setting_listitem_bg_middle, |
198 |
|
R.drawable.setting_listitem_bg_middle, |
199 |
|
R.drawable.setting_listitem_bg_middle, |
200 |
|
R.drawable.setting_listitem_bg_bottom |
201 |
|
}; |
202 |
|
} |
203 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
204 |
|
public interface ResultCode{ |
205 |
|
int SUCCESS = 0; |
206 |
|
int HTTP_REQUEST_FAILED = 1; |
207 |
|
int JSON_PARSER_FAILED = 2; |
208 |
|
int LOAD_ASSETS_FAILED = 3; |
209 |
|
int CHANGE_CITY_FAILED = 4; |
210 |
|
int NETWORK_DISCONNECT = 5; |
211 |
|
} |
212 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
213 |
|
public interface NetworkInfo{ |
214 |
|
int DISCONNECT = 0; |
215 |
|
int WIFI = 1; |
216 |
|
int MOBILE = 2; |
217 |
|
} |
218 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
219 |
|
public interface ParcelableTag{ |
220 |
|
String BICYCLE_STATION_INFO = "bicycle_station_info"; |
221 |
|
String VERSION_NEED_UPDATE = "need_update"; |
222 |
|
String CURRENCY_NAME = "currency_name"; |
223 |
|
String TOTAL_POINT = "total_point"; |
224 |
|
String GET_POINT_ERROR_MSG = "get_point_error_msg"; |
225 |
|
} |
226 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
227 |
|
public interface HttpUrl{ |
228 |
|
String VERSION_INFO_URL = "http://waltoy.cnodejs.net/versioninfo"; |
229 |
|
String FEEDBACK_URL = "http://waltoy.cnodejs.net/feedback"; |
230 |
|
String APP_URI = "market://details?id=com.dreamcatcher.bicycle"; |
231 |
|
} |
232 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
233 |
|
public interface AdSetting{ |
234 |
|
String SHOW_AD = "showAd"; |
235 |
|
int REMOVE_AD_MIN_POINT = 200; |
236 |
|
long MONTH_TIME = 2592000000L; |
237 |
|
} |
238 |
|
} |