Skip to content

Commit 4d29f10

Browse files
committed
API 14
1 parent 7b10866 commit 4d29f10

11 files changed

Lines changed: 61 additions & 121 deletions

File tree

.idea/encodings.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

res/color/text_bl_regular.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

res/color/text_wh_large.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

res/color/text_wh_regular.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

res/layout/app_bar_main.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121

2222
</android.support.design.widget.AppBarLayout>
2323

24-
<include layout="@layout/fragment_container" />
25-
<!--<FrameLayout
26-
android:id="@+id/fragment_container"
27-
android:layout_width="match_parent"
28-
android:layout_height="match_parent">
24+
<include layout="@layout/fragment_container"/>
25+
<!--<FrameLayout
26+
android:id="@+id/fragment_container"
27+
android:layout_width="match_parent"
28+
android:layout_height="match_parent">
2929
30-
&lt;!&ndash;<fragment
31-
android:id="@+id/homeFragment"
32-
android:name="com.opentaxi.android.fragments.HomeFragment_"
33-
android:layout_width="fill_parent"
34-
android:layout_height="fill_parent"/>&ndash;&gt;
35-
</FrameLayout>-->
30+
&lt;!&ndash;<fragment
31+
android:id="@+id/homeFragment"
32+
android:name="com.opentaxi.android.fragments.HomeFragment_"
33+
android:layout_width="fill_parent"
34+
android:layout_height="fill_parent"/>&ndash;&gt;
35+
</FrameLayout>-->
3636

3737

3838
<!--<android.support.design.widget.FloatingActionButton android:id="@+id/fab"
@@ -62,6 +62,6 @@
6262
android:layout_gravity="bottom|end"
6363
android:layout_margin="@dimen/fab_margin"
6464
android:scaleType="centerCrop"
65-
android:visibility="gone"/> <!--fab:fab_icon="@drawable/travel59"-->
65+
android:visibility="invisible"/> <!--fab:fab_icon="@drawable/travel59"-->
6666

6767
</android.support.design.widget.CoordinatorLayout>

res/layout/msg_layout.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
android:orientation="vertical"
8-
android:background="@color/black_color"
98
android:divider="?android:dividerHorizontal"
109
android:showDividers="middle"
1110
android:clickable="true"
@@ -19,10 +18,13 @@
1918

2019
<TextView
2120
android:textSize="35sp"
22-
android:textColor="#ffffffff"
2321
android:id="@+id/msgText"
2422
android:layout_width="wrap_content"
25-
android:layout_height="wrap_content"/>
23+
android:layout_height="wrap_content"
24+
android:paddingTop="@dimen/activity_vertical_margin"
25+
android:paddingBottom="@dimen/activity_vertical_margin"
26+
android:paddingLeft="@dimen/activity_horizontal_margin"
27+
android:paddingRight="@dimen/activity_horizontal_margin"/>
2628
</ScrollView>
2729

2830
<LinearLayout

res/values-bg/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
<string name="stay_price">престой</string>
151151
<string name="options_help">Помощ</string>
152152
<string name="from_taxi">от такси номер: %1$s</string>
153-
<string name="request_rejected">Съжаляваме но поръчка %1$s ( %2$s ) е отказана.</string>
153+
<string name="request_rejected">Съжаляваме но поръчка %1$s \nАдрес: %2$s \nе отказана.</string>
154154
<string name="request_edited">Поръчка:%1$s ( %2$s ) е променена.</string>
155155
<string name="private_request_rejected">Съжаляваме но поръчка номер:%1$s ( %2$s ) е отказана %3$s. Желаете ли да получите друг автомобил?</string>
156156
<string name="request_aproved">Поръчка:%1$s ( %2$s ) е потвърдена %3$s</string>

res/values/colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<color name="background_color">#EFEFEF</color>
55
<color name="white_color">#FFFFFF</color>
66
<color name="black_color">#000000</color>
7+
<color name="green_color">#008000</color>
8+
<color name="blue_color">#0000C0</color>
79
<color name="label_color">#FF3FFF3F</color>
810
<color name="yellow_color">#FFF300</color>
911
<color name="red_color">#FFFF0000</color>

res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
55
<!-- Customize your theme here. -->
66
<item name="colorPrimary">@color/app_primary</item>
7-
<item name="colorPrimaryDark">@color/app_primary_dark</item>
7+
<item name="colorPrimaryDark">@color/black_color</item>
88
<item name="colorAccent">@color/material_deep_orange_700</item>
99
<!--<item name="colorAccent" tools:ignore="NewApi">#0092ff</item>
1010
<item name="colorPrimary" tools:ignore="NewApi">#ffcc00</item>

src/com/opentaxi/android/MainActivity.java

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -221,34 +221,34 @@ public void onDrawerClosed(View view) {
221221
if (navMenu != null) {
222222
MenuItem navHome = navMenu.findItem(R.id.nav_home);
223223
if (navHome != null)
224-
navHome.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_home).actionBar().color(Color.BLACK));
224+
navHome.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_home).actionBar().colorRes(R.color.material_deep_orange_700));
225225

226226
MenuItem navMap = navMenu.findItem(R.id.nav_map);
227227
if (navMap != null)
228-
navMap.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_map).actionBar().color(Color.BLUE));
228+
navMap.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_map).actionBar().colorRes(R.color.app_primary_dark));
229229

230230
MenuItem navRequest = navMenu.findItem(R.id.nav_request);
231231
if (navRequest != null)
232-
navRequest.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_local_taxi).actionBar().color(Color.RED));
232+
navRequest.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_local_taxi).actionBar().colorRes(R.color.timebase_color));
233233

234234
MenuItem navHistory = navMenu.findItem(R.id.nav_history);
235235
if (navHistory != null)
236-
navHistory.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_history).actionBar().color(Color.GREEN));
236+
navHistory.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_history).actionBar().colorRes(R.color.app_primary));
237237

238238
MenuItem navServers = navMenu.findItem(R.id.nav_servers);
239239
if (navServers != null)
240-
navServers.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_cloud).actionBar().color(Color.BLUE));
240+
navServers.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_cloud).actionBar().colorRes(R.color.transparent_blue));
241241

242242
MenuItem navLog = navMenu.findItem(R.id.nav_send_log);
243243
if (navLog != null)
244-
navLog.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_bug_report).actionBar().color(Color.RED));
244+
navLog.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_bug_report).actionBar().colorRes(R.color.red_color));
245245

246246
MenuItem navExit = navMenu.findItem(R.id.nav_exit);
247247
if (navExit != null)
248-
navExit.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_exit_to_app).actionBar().color(Color.BLACK));
248+
navExit.setIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_exit_to_app).actionBar().colorRes(R.color.black_color));
249249
}
250250

251-
fab.setIconDrawable(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_local_taxi).sizeDp(35).color(Color.GREEN));
251+
fab.setIconDrawable(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_local_taxi).sizeDp(35).colorRes(R.color.label_color));
252252

253253
AppPreferences appPreferences = AppPreferences.getInstance(this);
254254
RestClient.getInstance().setSocketsType(appPreferences.getSocketType());
@@ -532,6 +532,8 @@ public void createNotification() {
532532

533533
private void doObtainedLocation(Location location) {
534534
try {
535+
EventBus.getDefault().postSticky(location);
536+
535537
CoordinatesLight coordinates = new CoordinatesLight();
536538
coordinates.setN(location.getLatitude());
537539
coordinates.setE(location.getLongitude());
@@ -540,6 +542,8 @@ private void doObtainedLocation(Location location) {
540542
i.putExtra("coordinates", coordinates);
541543
startService(i);
542544

545+
//Log.i("doObtainedLocation", "onReceive:" + location);
546+
543547
/*if (AppPreferences.getInstance() != null) {
544548
545549
Date now = new Date();
@@ -710,24 +714,29 @@ void showNewRequest(boolean show) {
710714
Log.i(TAG, "showNewRequest");
711715
if (fab != null) {
712716
if (show) {
713-
fab.setVisibility(View.VISIBLE);
714-
Tooltip.make(this,
715-
new Tooltip.Builder(101)
716-
.anchor(fab, Tooltip.Gravity.LEFT)
717-
.closePolicy(new Tooltip.ClosePolicy()
718-
.insidePolicy(true, false)
719-
.outsidePolicy(true, false), 20000)
720-
//.activateDelay(1800)
721-
.showDelay(3000)
722-
.text(getResources(), R.string.taxi_tooltip) //"Поръчай такси с едно кликване"
723-
//.maxWidth(500)
724-
.withArrow(true)
725-
.withOverlay(true)
726-
//.floatingAnimation(Tooltip.AnimationBuilder.SLOW)
727-
.withStyleId(R.style.ToolTipLayoutCustomStyle)
728-
.build()
729-
).show();
730-
} else fab.setVisibility(View.INVISIBLE);
717+
if (fab.getVisibility() == View.INVISIBLE) {
718+
fab.setVisibility(View.VISIBLE);
719+
Tooltip.make(this,
720+
new Tooltip.Builder(101)
721+
.anchor(fab, Tooltip.Gravity.LEFT)
722+
.closePolicy(new Tooltip.ClosePolicy()
723+
.insidePolicy(true, false)
724+
.outsidePolicy(true, false), 60000)
725+
//.activateDelay(1800)
726+
.showDelay(2000)
727+
.text(getResources(), R.string.taxi_tooltip) //"Поръчай такси с едно кликване"
728+
//.maxWidth(500)
729+
.withArrow(true)
730+
.withOverlay(true)
731+
//.floatingAnimation(Tooltip.AnimationBuilder.SLOW)
732+
.withStyleId(R.style.ToolTipLayoutCustomStyle)
733+
.build()
734+
).show();
735+
}
736+
} else {
737+
fab.setVisibility(View.INVISIBLE);
738+
Tooltip.remove(this, 101);
739+
}
731740
} else Log.e(TAG, "fab=null");
732741
}
733742

0 commit comments

Comments
 (0)