From d17d89f7f9a51bb247a1a055eedee0273ba26c0b Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Fri, 4 Nov 2016 23:28:57 +0100 Subject: [PATCH] Fixed lint issues (suppressed, where they cant be fixed) --- app/src/main/AndroidManifest.xml | 7 +++++-- .../diaspora_android/activity/SettingsActivity.java | 2 ++ .../dfa/diaspora_android/ui/PodSelectionDialog.java | 11 +++++++++++ app/src/main/res/layout/main__nav_header.xml | 5 +++-- app/src/main/res/layout/podselection__dialog.xml | 7 +++++-- app/src/main/res/menu/main__menu_bottom.xml | 3 ++- app/src/main/res/menu/main__menu_top.xml | 3 ++- .../menu/main__menu_top__notifications_dropdown.xml | 3 ++- app/src/main/res/menu/stream__menu_bottom.xml | 4 +++- app/src/main/res/menu/stream__menu_top.xml | 2 -- app/src/main/res/values/color.xml | 4 +++- app/src/main/res/values/strings.xml | 2 ++ 12 files changed, 40 insertions(+), 13 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fe8e3163..67edd76a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,8 @@ + xmlns:tools="http://schemas.android.com/tools" + package="com.github.dfa.diaspora_android" + tools:ignore="GoogleAppIndexingWarning"> @@ -15,7 +17,8 @@ + android:authorities="com.github.dfa.diaspora_android.mainactivity" + android:exported="false"/> Primary Color, 2 -> Accent Color */ + @SuppressLint("InflateParams") public void showColorPickerDialog(final int type) { final AppSettings appSettings = ((App) getActivity().getApplication()).getSettings(); final Context context = getActivity(); diff --git a/app/src/main/java/com/github/dfa/diaspora_android/ui/PodSelectionDialog.java b/app/src/main/java/com/github/dfa/diaspora_android/ui/PodSelectionDialog.java index 663ae5f4..3286d7ea 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/ui/PodSelectionDialog.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/ui/PodSelectionDialog.java @@ -1,6 +1,7 @@ package com.github.dfa.diaspora_android.ui; +import android.annotation.SuppressLint; import android.app.Dialog; import android.os.Bundle; import android.support.annotation.NonNull; @@ -9,6 +10,7 @@ import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.widget.ArrayAdapter; +import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; import android.widget.RadioGroup; @@ -93,6 +95,12 @@ public class PodSelectionDialog extends ThemedAppCompatDialogFragment { @BindView(R.id.podselection__dialog__text_protocol) TextView textProtocol; + @BindView(R.id.podselection__dialog__btn_ok) + Button btnOk; + + @BindView(R.id.podselection__dialog__btn_cancel) + Button btnCancel; + private PodSelectionDialogResultListener resultListener; private View root; private DiasporaPod pod = new DiasporaPod(); @@ -100,6 +108,7 @@ public class PodSelectionDialog extends ThemedAppCompatDialogFragment { @NonNull @Override + @SuppressLint("InflateParams") public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); @@ -135,6 +144,8 @@ public class PodSelectionDialog extends ThemedAppCompatDialogFragment { textProfile.setTextColor(ThemeHelper.getAccentColor()); textProtocol.setTextColor(ThemeHelper.getAccentColor()); textTorPreset.setTextColor(ThemeHelper.getAccentColor()); + btnOk.setTextColor(ThemeHelper.getAccentColor()); + btnCancel.setTextColor(ThemeHelper.getAccentColor()); ThemeHelper.updateEditTextColor(editPodAddress); ThemeHelper.updateEditTextColor(editPodName); diff --git a/app/src/main/res/layout/main__nav_header.xml b/app/src/main/res/layout/main__nav_header.xml index d3294497..39003d1e 100644 --- a/app/src/main/res/layout/main__nav_header.xml +++ b/app/src/main/res/layout/main__nav_header.xml @@ -1,9 +1,9 @@ @@ -36,7 +36,8 @@ android:layout_marginEnd="@dimen/activity_horizontal_margin_half" android:layout_marginStart="@dimen/activity_horizontal_margin" android:scaleType="fitCenter" - android:src="@drawable/ic_launcher" /> + android:src="@drawable/ic_launcher" + tools:ignore="ContentDescription" /> + android:text="@string/http" /> + android:text="@string/https" />