Updated text color for light theme and added header to dialog in Group Settings

This commit is contained in:
Denis 2015-02-04 18:18:25 +02:00
parent 9110be7990
commit 1bac28e8c2
4 changed files with 26 additions and 0 deletions

View file

@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="edit_group">Edit group</string>
<string name="parking_place">Parking place</string>
<string name="remove_the_tag">REMOVE THE TAG</string>
<string name="gps_status">GPS Status</string>

View file

@ -138,6 +138,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
searchView = new SearchView(getActivity());
FavoritesActivity.updateSearchView(getActivity(), searchView);
MenuItemCompat.setActionView(mi,searchView);
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {

View file

@ -8,7 +8,9 @@ import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import net.osmand.plus.GpxSelectionHelper;
@ -23,6 +25,7 @@ import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.TabWidget;
@ -162,5 +165,22 @@ public class FavoritesActivity extends TabActivity {
}
return false;
}
public static void updateSearchView(Activity activity, SearchView searchView) {
//do not ever do like this
OsmandApplication app = (OsmandApplication)activity.getApplication();
if (app.getSettings().isLightContent()){
try {
ImageView cancelIcon = (ImageView) searchView.findViewById(R.id.search_close_btn);
cancelIcon.setImageResource(R.drawable.ic_action_gremove_dark);
ImageView searchIcon = (ImageView) searchView.findViewById(R.id.search_voice_btn);
searchIcon.setImageResource(R.drawable.ic_action_search_dark);
SearchView.SearchAutoComplete searchBadge = (SearchView.SearchAutoComplete) searchView.findViewById(R.id.search_src_text);
searchBadge.setTextColor(activity.getResources().getColor(R.color.color_white));
} catch (NullPointerException e){
}
}
}
}

View file

@ -28,6 +28,7 @@ import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXFile;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
@ -356,6 +357,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
}
}
public void showProgressBar() {
getActionBarActivity().setSupportProgressBarIndeterminateVisibility(true);
}
@ -475,6 +478,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
final CheckBox checkBox = (CheckBox) favEdit.findViewById(R.id.Visibility);
checkBox.setChecked(group.visible);
bld.setTitle(R.string.edit_group);
bld.setView(favEdit);
bld.setNegativeButton(R.string.default_buttons_cancel, null);
bld.setPositiveButton(R.string.default_buttons_ok, new DialogInterface.OnClickListener() {