Merge remote-tracking branch 'origin/master'
Before Width: | Height: | Size: 860 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.2 KiB |
|
@ -38,7 +38,6 @@
|
|||
<Button
|
||||
android:id="@+id/poi"
|
||||
style="?attr/dashboardSearchButtonStyle"
|
||||
android:drawableTop="?attr/ic_action_info2"
|
||||
android:text="@string/poi" />
|
||||
|
||||
<View
|
||||
|
@ -49,7 +48,6 @@
|
|||
<Button
|
||||
android:id="@+id/address"
|
||||
style="?attr/dashboardSearchButtonStyle"
|
||||
android:drawableTop="?attr/ic_action_home2"
|
||||
android:text="@string/address" />
|
||||
|
||||
<View
|
||||
|
@ -60,7 +58,6 @@
|
|||
<Button
|
||||
android:id="@+id/coord"
|
||||
style="?attr/dashboardSearchButtonStyle"
|
||||
android:drawableTop="?attr/ic_action_marker2"
|
||||
android:text="@string/coordinates" />
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
<attr name="dashboard_divider" format="reference" />
|
||||
<attr name="dashboard_button" format="reference" />
|
||||
<attr name="dashboardSearchButtonStyle" format="reference" />
|
||||
<attr name="ic_action_info2" format="reference" />
|
||||
<attr name="ic_action_home2" format="reference" />
|
||||
<attr name="ic_action_marker2" format="reference" />
|
||||
<attr name="search_background" format="reference" />
|
||||
<attr name="switch_ex_background" format="reference" />
|
||||
<attr name="switch_ex_text_color" format="color|reference" />
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
<color name="app_mode_icon_color">#33B4E4</color>
|
||||
|
||||
<color name="dash_search_icon_light">#536DFE</color>
|
||||
<color name="dash_search_icon_dark">#606E78</color>
|
||||
|
||||
<color name="parking_outdated_color">#f41a34</color>
|
||||
<color name="osmo_header_dark">#2d383d</color>
|
||||
<color name="osmo_header_light">#b36d12</color>
|
||||
|
|
|
@ -140,9 +140,6 @@
|
|||
<item name="dashboard_divider">@color/dashboard_divider_light</item>
|
||||
<item name="dashboard_button">@drawable/dashboard_button_light</item>
|
||||
<item name="dashboardSearchButtonStyle">@style/DashboardSearchButton.Light</item>
|
||||
<item name="ic_action_info2">@drawable/ic_action_info2_light</item>
|
||||
<item name="ic_action_home2">@drawable/ic_action_home2_light</item>
|
||||
<item name="ic_action_marker2">@drawable/ic_action_marker2_light</item>
|
||||
<item name="search_background">@color/search_background_dark</item>
|
||||
<item name="android:actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
|
@ -185,9 +182,6 @@
|
|||
<item name="dashboard_divider">@color/dashboard_divider_dark</item>
|
||||
<item name="dashboard_button">@drawable/dashboard_button_dark</item>
|
||||
<item name="dashboardSearchButtonStyle">@style/DashboardSearchButton.Dark</item>
|
||||
<item name="ic_action_info2">@drawable/ic_action_info2_dark</item>
|
||||
<item name="ic_action_home2">@drawable/ic_action_home2_dark</item>
|
||||
<item name="ic_action_marker2">@drawable/ic_action_marker2_dark</item>
|
||||
<item name="search_background">@color/color_white</item>
|
||||
<item name="switch_ex_background">@drawable/switch_ex_background_dark</item>
|
||||
<item name="switch_ex_text_color">@color/switch_ex_button_text_dark</item>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package net.osmand.plus.dashboard;
|
||||
|
||||
import net.osmand.plus.OsmAndAppCustomization;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.search.SearchActivity;
|
||||
import net.osmand.plus.helpers.FontCache;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
|
@ -15,8 +11,15 @@ import android.view.ViewGroup;
|
|||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.plus.IconsCache;
|
||||
import net.osmand.plus.OsmAndAppCustomization;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.search.SearchActivity;
|
||||
import net.osmand.plus.helpers.FontCache;
|
||||
|
||||
/**
|
||||
* Created by Denis on 24.11.2014.
|
||||
* Created by Denis on
|
||||
* 24.11.2014.
|
||||
*/
|
||||
public class DashSearchFragment extends DashBaseFragment {
|
||||
|
||||
|
@ -29,6 +32,8 @@ public class DashSearchFragment extends DashBaseFragment {
|
|||
Typeface typeface = FontCache.getRobotoMedium(getActivity());
|
||||
((TextView) view.findViewById(R.id.search_for)).setTypeface(typeface);
|
||||
((Button) view.findViewById(R.id.recents)).setTypeface(typeface);
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -40,32 +45,43 @@ public class DashSearchFragment extends DashBaseFragment {
|
|||
getMyApplication().getSettings().SEARCH_TAB.set(tab);
|
||||
activity.startActivity(search);
|
||||
}
|
||||
|
||||
private void setupButtons(View view){
|
||||
|
||||
private void setupButtons(View view) {
|
||||
final Activity activity = getActivity();
|
||||
final OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
|
||||
// EditText searchText = (EditText) view.findViewById(R.id.search_text);
|
||||
// searchText.addTextChangedListener(textWatcher);
|
||||
(view.findViewById(R.id.poi)).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
||||
boolean light = getMyApplication().getSettings().isLightContent();
|
||||
Button btn = (Button) view.findViewById(R.id.poi);
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
searchActivity(activity, appCustomization, SearchActivity.POI_TAB_INDEX);
|
||||
}
|
||||
});
|
||||
btn.setCompoundDrawablesWithIntrinsicBounds(null, iconsCache.getIcon(R.drawable.ic_action_info2,
|
||||
light ? R.color.dash_search_icon_light : R.color.dash_search_icon_dark), null, null);
|
||||
|
||||
(view.findViewById(R.id.address)).setOnClickListener(new View.OnClickListener() {
|
||||
btn = (Button)view.findViewById(R.id.address);
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
searchActivity(activity, appCustomization, SearchActivity.ADDRESS_TAB_INDEX);
|
||||
}
|
||||
});
|
||||
btn.setCompoundDrawablesWithIntrinsicBounds(null, iconsCache.getIcon(R.drawable.ic_action_home2,
|
||||
light ? R.color.dash_search_icon_light : R.color.dash_search_icon_dark), null, null);
|
||||
|
||||
(view.findViewById(R.id.coord)).setOnClickListener(new View.OnClickListener() {
|
||||
btn = (Button) view.findViewById(R.id.coord);
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
searchActivity(activity, appCustomization, SearchActivity.LOCATION_TAB_INDEX);
|
||||
}
|
||||
});
|
||||
btn.setCompoundDrawablesWithIntrinsicBounds(null, iconsCache.getIcon(R.drawable.ic_action_marker2,
|
||||
light ? R.color.dash_search_icon_light : R.color.dash_search_icon_dark), null, null);
|
||||
|
||||
(view.findViewById(R.id.recents)).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -73,9 +89,9 @@ public class DashSearchFragment extends DashBaseFragment {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onOpenDash() {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|