mirror of
https://github.com/TimeCrafters/TimeCraftersConfigurationTool.git
synced 2025-12-15 21:12:34 +00:00
Fixed dialog default titlebar shown on android 5.1, added spacing for control buttons in EditVariable dialog to prevent accidently triggering the cancel/add buttons
This commit is contained in:
@@ -5,15 +5,24 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import org.timecrafters.TimeCraftersConfigurationTool.R;
|
||||
|
||||
public class Dialog extends DialogFragment {
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
View v = View.inflate(getContext(), R.layout.dialog_base, null);
|
||||
|
||||
ImageButton closeButton = v.findViewById(R.id.dialogCloseButton);
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dialog_button_margin"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/rename_configuration"
|
||||
style="@style/Widget.AppCompat.ImageButton"
|
||||
style="@style/Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/delete_configuration"
|
||||
style="@style/Widget.AppCompat.ImageButton"
|
||||
style="@style/Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
style="@style/Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.1"
|
||||
android:src="@drawable/search" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
<dimen name="button_margin_bottom">8dp</dimen>
|
||||
|
||||
<dimen name="dialogTitleTextSize">18dp</dimen>
|
||||
<dimen name="dialog_button_margin">36dp</dimen>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user