Skip to content

Commit c007da8

Browse files
committed
version 31. fix new request dialog
1 parent de29a55 commit c007da8

5 files changed

Lines changed: 240 additions & 48 deletions

File tree

AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.opentaxi.android"
4-
android:versionName="1.0.30"
5-
android:versionCode="29"
4+
android:versionName="1.0.31"
5+
android:versionCode="30"
66
android:installLocation="auto">
77

88
<uses-sdk

TaxiAndroidOpen.apk

72 Bytes
Binary file not shown.

generated/com/opentaxi/android/NewRequestActivity_.java

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -87,35 +87,20 @@ public static NewRequestActivity_.IntentBuilder_ intent(Fragment supportFragment
8787

8888
@Override
8989
public void onViewChanged(HasViews hasViews) {
90-
reqInfoButtonContainer = ((LinearLayout) hasViews.findViewById(id.reqInfoButtonContainer));
91-
llFilters = ((LinearLayout) hasViews.findViewById(id.llFilters));
9290
citiesPicker = ((AutoCompleteTextView) hasViews.findViewById(id.citiesPicker));
93-
region = ((TextView) hasViews.findViewById(id.region));
91+
pbProgress = ((ProgressBar) hasViews.findViewById(id.pbProgress));
92+
regionsLayout = ((LinearLayout) hasViews.findViewById(id.regionsLayout));
9493
destination = ((AutoCompleteTextView) hasViews.findViewById(id.destination));
95-
address = ((TextView) hasViews.findViewById(id.address));
94+
llFilters = ((LinearLayout) hasViews.findViewById(id.llFilters));
9695
destLayout = ((LinearLayout) hasViews.findViewById(id.destLayout));
97-
addressChange = ((Button) hasViews.findViewById(id.addressChange));
98-
requestSend = ((Button) hasViews.findViewById(id.requestSend));
96+
address = ((TextView) hasViews.findViewById(id.address));
97+
pricesPicker = ((Spinner) hasViews.findViewById(id.pricesPicker));
9998
regionsPicker = ((AutoCompleteTextView) hasViews.findViewById(id.regionsPicker));
10099
addressText = ((EditText) hasViews.findViewById(id.addressText));
101-
pbProgress = ((ProgressBar) hasViews.findViewById(id.pbProgress));
102-
regionsLayout = ((LinearLayout) hasViews.findViewById(id.regionsLayout));
103-
pricesPicker = ((Spinner) hasViews.findViewById(id.pricesPicker));
104-
{
105-
View view = hasViews.findViewById(id.addressImage);
106-
if (view!= null) {
107-
view.setOnClickListener(new OnClickListener() {
108-
109-
110-
@Override
111-
public void onClick(View view) {
112-
NewRequestActivity_.this.addressImage();
113-
}
114-
115-
}
116-
);
117-
}
118-
}
100+
reqInfoButtonContainer = ((LinearLayout) hasViews.findViewById(id.reqInfoButtonContainer));
101+
region = ((TextView) hasViews.findViewById(id.region));
102+
addressChange = ((Button) hasViews.findViewById(id.addressChange));
103+
requestSend = ((Button) hasViews.findViewById(id.requestSend));
119104
if (requestSend!= null) {
120105
requestSend.setOnClickListener(new OnClickListener() {
121106

@@ -140,6 +125,21 @@ public void onClick(View view) {
140125
}
141126
);
142127
}
128+
{
129+
View view = hasViews.findViewById(id.addressImage);
130+
if (view!= null) {
131+
view.setOnClickListener(new OnClickListener() {
132+
133+
134+
@Override
135+
public void onClick(View view) {
136+
NewRequestActivity_.this.addressImage();
137+
}
138+
139+
}
140+
);
141+
}
142+
}
143143
afterActivity();
144144
}
145145

@@ -169,55 +169,55 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
169169
}
170170

171171
@Override
172-
public void showPrices(final Groups[] prices) {
172+
public void showRegions(final Regions[] regions) {
173173
handler_.post(new Runnable() {
174174

175175

176176
@Override
177177
public void run() {
178-
NewRequestActivity_.super.showPrices(prices);
178+
NewRequestActivity_.super.showRegions(regions);
179179
}
180180

181181
}
182182
);
183183
}
184184

185185
@Override
186-
public void showAddress(final String city, final String region, final String adr) {
186+
public void showCities(final Contactaddress contactAddress) {
187187
handler_.post(new Runnable() {
188188

189189

190190
@Override
191191
public void run() {
192-
NewRequestActivity_.super.showAddress(city, region, adr);
192+
NewRequestActivity_.super.showCities(contactAddress);
193193
}
194194

195195
}
196196
);
197197
}
198198

199199
@Override
200-
public void SuccessDialog() {
200+
public void showPrices(final Groups[] prices) {
201201
handler_.post(new Runnable() {
202202

203203

204204
@Override
205205
public void run() {
206-
NewRequestActivity_.super.SuccessDialog();
206+
NewRequestActivity_.super.showPrices(prices);
207207
}
208208

209209
}
210210
);
211211
}
212212

213213
@Override
214-
public void showCities(final Contactaddress contactAddress) {
214+
public void showAddress(final String city, final String region, final String adr) {
215215
handler_.post(new Runnable() {
216216

217217

218218
@Override
219219
public void run() {
220-
NewRequestActivity_.super.showCities(contactAddress);
220+
NewRequestActivity_.super.showAddress(city, region, adr);
221221
}
222222

223223
}
@@ -239,27 +239,27 @@ public void run() {
239239
}
240240

241241
@Override
242-
public void ErrorDialog() {
242+
public void SuccessDialog() {
243243
handler_.post(new Runnable() {
244244

245245

246246
@Override
247247
public void run() {
248-
NewRequestActivity_.super.ErrorDialog();
248+
NewRequestActivity_.super.SuccessDialog();
249249
}
250250

251251
}
252252
);
253253
}
254254

255255
@Override
256-
public void showRegions(final Regions[] regions) {
256+
public void ErrorDialog() {
257257
handler_.post(new Runnable() {
258258

259259

260260
@Override
261261
public void run() {
262-
NewRequestActivity_.super.showRegions(regions);
262+
NewRequestActivity_.super.ErrorDialog();
263263
}
264264

265265
}
@@ -285,14 +285,14 @@ public void execute() {
285285
}
286286

287287
@Override
288-
public void setGroups() {
288+
public void setCities() {
289289
BackgroundExecutor.execute(new BackgroundExecutor.Task("", 0, "") {
290290

291291

292292
@Override
293293
public void execute() {
294294
try {
295-
NewRequestActivity_.super.setGroups();
295+
NewRequestActivity_.super.setCities();
296296
} catch (Throwable e) {
297297
Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
298298
}
@@ -321,14 +321,14 @@ public void execute() {
321321
}
322322

323323
@Override
324-
public void sendRequest(final NewRequestDetails newRequest) {
324+
public void setGroups() {
325325
BackgroundExecutor.execute(new BackgroundExecutor.Task("", 0, "") {
326326

327327

328328
@Override
329329
public void execute() {
330330
try {
331-
NewRequestActivity_.super.sendRequest(newRequest);
331+
NewRequestActivity_.super.setGroups();
332332
} catch (Throwable e) {
333333
Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
334334
}
@@ -339,14 +339,14 @@ public void execute() {
339339
}
340340

341341
@Override
342-
public void setCities() {
342+
public void sendRequest(final NewRequestDetails newRequest) {
343343
BackgroundExecutor.execute(new BackgroundExecutor.Task("", 0, "") {
344344

345345

346346
@Override
347347
public void execute() {
348348
try {
349-
NewRequestActivity_.super.setCities();
349+
NewRequestActivity_.super.sendRequest(newRequest);
350350
} catch (Throwable e) {
351351
Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
352352
}

src/com/opentaxi/android/NewRequestActivity.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,19 +583,27 @@ void addressChange() {
583583

584584
@Click
585585
void addressImage() {
586-
if (this.mapRequest == null) this.mapRequest = new MapRequest();
587586
if (addressText.getVisibility() == View.VISIBLE) {
588587
if (citiesPicker.getText() != null) {
589588
String txt = citiesPicker.getText().toString();
590-
if (txt != null && txt.length() > 0) this.mapRequest.setCity(txt);
589+
if (txt != null && txt.length() > 0) {
590+
if (this.mapRequest == null) this.mapRequest = new MapRequest();
591+
this.mapRequest.setCity(txt);
592+
}
591593
}
592594
if (regionsPicker.getText() != null) {
593595
String txt = regionsPicker.getText().toString();
594-
if (txt != null && txt.length() > 0) this.mapRequest.setRegion(txt);
596+
if (txt != null && txt.length() > 0) {
597+
if (this.mapRequest == null) this.mapRequest = new MapRequest();
598+
this.mapRequest.setRegion(txt);
599+
}
595600
}
596601
if (addressText.getText() != null) {
597602
String txt = addressText.getText().toString();
598-
if (txt != null && txt.length() > 0) this.mapRequest.setAddress(txt);
603+
if (txt != null && txt.length() > 0) {
604+
if (this.mapRequest == null) this.mapRequest = new MapRequest();
605+
this.mapRequest.setAddress(txt);
606+
}
599607
}
600608
}
601609

0 commit comments

Comments
 (0)