@@ -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