diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java index a8193ab0d..34d415abe 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java @@ -30,10 +30,12 @@ import android.util.TypedValue; import android.view.Gravity; import android.view.MenuItem; import android.view.View; +import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.EditText; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TableLayout; @@ -169,9 +171,15 @@ public class ActivitySummaryDetail extends AbstractGBActivity { input.setInputType(InputType.TYPE_CLASS_TEXT); String name = currentItem.getName(); input.setText((name != null) ? name : ""); + FrameLayout container = new FrameLayout(ActivitySummaryDetail.this); + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + params.leftMargin = getResources().getDimensionPixelSize(R.dimen.dialog_margin); + params.rightMargin = getResources().getDimensionPixelSize(R.dimen.dialog_margin); + input.setLayoutParams(params); + container.addView(input); - new AlertDialog.Builder(ActivitySummaryDetail.this) // TODO: very raw at this point, make better drawable layout, already started here: R.style.GadgetbridgeTheme_DialogTheme) - .setView(input) + new AlertDialog.Builder(ActivitySummaryDetail.this) + .setView(container) .setCancelable(true) .setTitle(ActivitySummaryDetail.this.getString(R.string.activity_summary_edit_name_title)) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java index bffc34669..2e9f55c00 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java @@ -30,6 +30,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.EditText; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; @@ -56,6 +57,7 @@ import java.util.Locale; import nodomain.freeyourgadget.gadgetbridge.GBApplication; import nodomain.freeyourgadget.gadgetbridge.R; import nodomain.freeyourgadget.gadgetbridge.activities.ActivitySummariesActivity; +import nodomain.freeyourgadget.gadgetbridge.activities.ActivitySummaryDetail; import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms; import nodomain.freeyourgadget.gadgetbridge.activities.VibrationActivity; import nodomain.freeyourgadget.gadgetbridge.activities.charts.ChartsActivity; @@ -484,10 +486,16 @@ public class GBDeviceAdapterv2 extends RecyclerView.Adapter16dp 160dp 16dp + 20dp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index affcab699..8260c24ce 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -65,21 +65,4 @@ @color/primarydark_dark @drawable/splash - - -