Small fixes
This commit is contained in:
parent
77a4a57627
commit
be36e9f54c
3 changed files with 17 additions and 9 deletions
|
@ -25,6 +25,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibilityPlugin;
|
||||
import net.osmand.access.AccessibleAlertBuilder;
|
||||
|
@ -492,8 +493,10 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
PrintStream printStream = new PrintStream(out);
|
||||
ex.printStackTrace(printStream);
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Version " + Version.getFullVersion(OsmandApplication.this) + "\n"). //$NON-NLS-1$
|
||||
append(DateFormat.format("dd.MM.yyyy h:mm:ss", System.currentTimeMillis()));
|
||||
msg.append("Version ")
|
||||
.append(Version.getFullVersion(OsmandApplication.this))
|
||||
.append("\n") //$NON-NLS-1$
|
||||
.append(DateFormat.format("dd.MM.yyyy h:mm:ss", System.currentTimeMillis()));
|
||||
try {
|
||||
PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
if (info != null) {
|
||||
|
@ -501,9 +504,11 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
msg.append("\n"). //$NON-NLS-1$//$NON-NLS-2$
|
||||
append("Exception occured in thread " + thread.toString() + " : \n"). //$NON-NLS-1$ //$NON-NLS-2$
|
||||
append(new String(out.toByteArray()));
|
||||
msg.append("\n")
|
||||
.append("Exception occured in thread ")
|
||||
.append(thread.toString())
|
||||
.append(" : \n")
|
||||
.append(new String(out.toByteArray()));
|
||||
|
||||
if (file.getParentFile().canWrite()) {
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));
|
||||
|
@ -641,7 +646,7 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
}
|
||||
|
||||
public String getLanguage() {
|
||||
String lang = "";
|
||||
String lang;
|
||||
if (preferredLocale != null) {
|
||||
lang = preferredLocale.getLanguage();
|
||||
} else {
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.activities;
|
|||
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
@ -17,7 +18,7 @@ public class OsmandActionBarActivity extends AppCompatActivity {
|
|||
//should be called after set content view
|
||||
protected void setupHomeButton(){
|
||||
Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
|
||||
back.setColorFilter(getResources().getColor(R.color.color_white), PorterDuff.Mode.MULTIPLY);
|
||||
back.setColorFilter(ContextCompat.getColor(this, R.color.color_white), PorterDuff.Mode.MULTIPLY);
|
||||
final ActionBar supportActionBar = getSupportActionBar();
|
||||
if (supportActionBar != null) {
|
||||
supportActionBar.setHomeButtonEnabled(true);
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.download.ui;
|
|||
import android.content.res.TypedArray;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.view.ContextThemeWrapper;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.TypedValue;
|
||||
|
@ -148,8 +149,9 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
|||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
setShowsDialog(true);
|
||||
listView.setBackgroundColor(getResources().getColor(
|
||||
getMyApplication().getSettings().isLightContent() ? R.color.bg_color_light : R.color.bg_color_dark));
|
||||
final boolean isLightContent = getMyApplication().getSettings().isLightContent();
|
||||
final int colorId = isLightContent ? R.color.bg_color_light : R.color.bg_color_dark;
|
||||
listView.setBackgroundColor(ContextCompat.getColor(getActivity(), colorId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue