1616import android .view .View ;
1717import android .view .View .OnClickListener ;
1818import android .view .ViewGroup .LayoutParams ;
19+ import android .widget .AutoCompleteTextView ;
1920import android .widget .Button ;
2021import android .widget .EditText ;
2122import android .widget .LinearLayout ;
2223import android .widget .ProgressBar ;
2324import android .widget .Spinner ;
2425import android .widget .TextView ;
26+ import android .widget .ToggleButton ;
2527import com .opentaxi .android .R .id ;
2628import com .opentaxi .android .R .layout ;
27- import com .opentaxi .generated .mysql .tables .pojos .Contactaddress ;
28- import com .opentaxi .generated .mysql .tables .pojos .Groups ;
29- import com .opentaxi .generated .mysql .tables .pojos .Regions ;
3029import com .opentaxi .models .NewCRequest ;
3130import com .opentaxi .models .NewRequestDetails ;
31+ import com .stil .generated .mysql .tables .pojos .Contactaddress ;
32+ import com .stil .generated .mysql .tables .pojos .Groups ;
33+ import com .stil .generated .mysql .tables .pojos .Regions ;
3234import org .androidannotations .api .BackgroundExecutor ;
3335import org .androidannotations .api .view .HasViews ;
3436import org .androidannotations .api .view .OnViewChangedListener ;
@@ -85,41 +87,43 @@ public static EditRequestActivity_.IntentBuilder_ intent(Fragment supportFragmen
8587
8688 @ Override
8789 public void onViewChanged (HasViews hasViews ) {
90+ region = ((TextView ) hasViews .findViewById (id .region ));
91+ addressText = ((EditText ) hasViews .findViewById (id .addressText ));
92+ llFilters = ((LinearLayout ) hasViews .findViewById (id .llFilters ));
93+ pricesPicker = ((Spinner ) hasViews .findViewById (id .pricesPicker ));
94+ destination = ((AutoCompleteTextView ) hasViews .findViewById (id .destination ));
95+ citiesPicker = ((AutoCompleteTextView ) hasViews .findViewById (id .citiesPicker ));
96+ reqInfoButtonContainer = ((LinearLayout ) hasViews .findViewById (id .reqInfoButtonContainer ));
8897 addressChange = ((Button ) hasViews .findViewById (id .addressChange ));
98+ regionsPicker = ((AutoCompleteTextView ) hasViews .findViewById (id .regionsPicker ));
8999 pbProgress = ((ProgressBar ) hasViews .findViewById (id .pbProgress ));
100+ addressImage = ((ToggleButton ) hasViews .findViewById (id .addressImage ));
90101 requestSend = ((Button ) hasViews .findViewById (id .requestSend ));
91102 address = ((TextView ) hasViews .findViewById (id .address ));
92- llFilters = ((LinearLayout ) hasViews .findViewById (id .llFilters ));
93- regionsPicker = ((Spinner ) hasViews .findViewById (id .regionsPicker ));
94- reqInfoButtonContainer = ((LinearLayout ) hasViews .findViewById (id .reqInfoButtonContainer ));
95- addressText = ((EditText ) hasViews .findViewById (id .addressText ));
96- citiesPicker = ((EditText ) hasViews .findViewById (id .citiesPicker ));
97- region = ((TextView ) hasViews .findViewById (id .region ));
98- pricesPicker = ((Spinner ) hasViews .findViewById (id .pricesPicker ));
99103 {
100- View view = hasViews .findViewById (id .requestSend );
104+ View view = hasViews .findViewById (id .addressChange );
101105 if (view != null ) {
102106 view .setOnClickListener (new OnClickListener () {
103107
104108
105109 @ Override
106110 public void onClick (View view ) {
107- EditRequestActivity_ .this .requestSend ();
111+ EditRequestActivity_ .this .addressChange ();
108112 }
109113
110114 }
111115 );
112116 }
113117 }
114118 {
115- View view = hasViews .findViewById (id .addressChange );
119+ View view = hasViews .findViewById (id .requestSend );
116120 if (view != null ) {
117121 view .setOnClickListener (new OnClickListener () {
118122
119123
120124 @ Override
121125 public void onClick (View view ) {
122- EditRequestActivity_ .this .addressChange ();
126+ EditRequestActivity_ .this .requestSend ();
123127 }
124128
125129 }
@@ -144,6 +148,16 @@ public void setIntent(Intent newIntent) {
144148 injectExtras_ ();
145149 }
146150
151+ @ Override
152+ public void onActivityResult (int requestCode , int resultCode , Intent data ) {
153+ super .onActivityResult (requestCode , resultCode , data );
154+ switch (requestCode ) {
155+ case 990 :
156+ EditRequestActivity_ .this .onResult (resultCode , data );
157+ break ;
158+ }
159+ }
160+
147161 @ Override
148162 public void showGroups (final Groups [] groups ) {
149163 handler_ .post (new Runnable () {
@@ -159,13 +173,13 @@ public void run() {
159173 }
160174
161175 @ Override
162- public void SuccessDialog ( ) {
176+ public void showCities ( final Contactaddress address ) {
163177 handler_ .post (new Runnable () {
164178
165179
166180 @ Override
167181 public void run () {
168- EditRequestActivity_ .super .SuccessDialog ( );
182+ EditRequestActivity_ .super .showCities ( address );
169183 }
170184
171185 }
@@ -187,13 +201,27 @@ public void run() {
187201 }
188202
189203 @ Override
190- public void showCities ( final Contactaddress address ) {
204+ public void ErrorDialog ( ) {
191205 handler_ .post (new Runnable () {
192206
193207
194208 @ Override
195209 public void run () {
196- EditRequestActivity_ .super .showCities (address );
210+ EditRequestActivity_ .super .ErrorDialog ();
211+ }
212+
213+ }
214+ );
215+ }
216+
217+ @ Override
218+ public void SuccessDialog () {
219+ handler_ .post (new Runnable () {
220+
221+
222+ @ Override
223+ public void run () {
224+ EditRequestActivity_ .super .SuccessDialog ();
197225 }
198226
199227 }
@@ -215,14 +243,14 @@ public void run() {
215243 }
216244
217245 @ Override
218- public void setCities ( ) {
246+ public void sendRequest ( final NewRequestDetails newRequest ) {
219247 BackgroundExecutor .execute (new BackgroundExecutor .Task ("" , 0 , "" ) {
220248
221249
222250 @ Override
223251 public void execute () {
224252 try {
225- EditRequestActivity_ .super .setCities ( );
253+ EditRequestActivity_ .super .sendRequest ( newRequest );
226254 } catch (Throwable e ) {
227255 Thread .getDefaultUncaughtExceptionHandler ().uncaughtException (Thread .currentThread (), e );
228256 }
@@ -233,14 +261,14 @@ public void execute() {
233261 }
234262
235263 @ Override
236- public void setRegions () {
264+ public void setPrices () {
237265 BackgroundExecutor .execute (new BackgroundExecutor .Task ("" , 0 , "" ) {
238266
239267
240268 @ Override
241269 public void execute () {
242270 try {
243- EditRequestActivity_ .super .setRegions ();
271+ EditRequestActivity_ .super .setPrices ();
244272 } catch (Throwable e ) {
245273 Thread .getDefaultUncaughtExceptionHandler ().uncaughtException (Thread .currentThread (), e );
246274 }
@@ -251,14 +279,14 @@ public void execute() {
251279 }
252280
253281 @ Override
254- public void setGroups () {
282+ public void setRegions () {
255283 BackgroundExecutor .execute (new BackgroundExecutor .Task ("" , 0 , "" ) {
256284
257285
258286 @ Override
259287 public void execute () {
260288 try {
261- EditRequestActivity_ .super .setGroups ();
289+ EditRequestActivity_ .super .setRegions ();
262290 } catch (Throwable e ) {
263291 Thread .getDefaultUncaughtExceptionHandler ().uncaughtException (Thread .currentThread (), e );
264292 }
@@ -269,14 +297,14 @@ public void execute() {
269297 }
270298
271299 @ Override
272- public void setPrices () {
300+ public void setGroups () {
273301 BackgroundExecutor .execute (new BackgroundExecutor .Task ("" , 0 , "" ) {
274302
275303
276304 @ Override
277305 public void execute () {
278306 try {
279- EditRequestActivity_ .super .setPrices ();
307+ EditRequestActivity_ .super .setGroups ();
280308 } catch (Throwable e ) {
281309 Thread .getDefaultUncaughtExceptionHandler ().uncaughtException (Thread .currentThread (), e );
282310 }
@@ -287,14 +315,14 @@ public void execute() {
287315 }
288316
289317 @ Override
290- public void sendRequest ( final NewRequestDetails newRequest ) {
318+ public void setCities ( ) {
291319 BackgroundExecutor .execute (new BackgroundExecutor .Task ("" , 0 , "" ) {
292320
293321
294322 @ Override
295323 public void execute () {
296324 try {
297- EditRequestActivity_ .super .sendRequest ( newRequest );
325+ EditRequestActivity_ .super .setCities ( );
298326 } catch (Throwable e ) {
299327 Thread .getDefaultUncaughtExceptionHandler ().uncaughtException (Thread .currentThread (), e );
300328 }
0 commit comments