mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Merge pull request #472 from chennemann/feat/create-habit-with-long-description
fix: habits with long description could not be saved
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits.activities.habits.edit;
|
package org.isoron.uhabits.activities.habits.edit;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.support.annotation.*;
|
import android.support.annotation.*;
|
||||||
@@ -117,6 +118,17 @@ public class EditHabitDialog extends AppCompatDialogFragment
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
final Dialog dialog = super.onCreateDialog(savedInstanceState);
|
||||||
|
final Window window = dialog.getWindow();
|
||||||
|
if (window != null) {
|
||||||
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
}
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
|
|
||||||
protected int getTitle()
|
protected int getTitle()
|
||||||
{
|
{
|
||||||
if (originalHabit != null) return R.string.edit_habit;
|
if (originalHabit != null) return R.string.edit_habit;
|
||||||
|
|||||||
@@ -17,11 +17,14 @@
|
|||||||
~ with this program. If not, see <http://www.gnu.org/licenses/>.
|
~ with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
style="@style/dialogForm"
|
style="@style/dialogForm"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:context=".activities.habits.edit.EditHabitDialog"
|
tools:context=".activities.habits.edit.EditHabitDialog"
|
||||||
tools:ignore="MergeRootFrame">
|
tools:ignore="MergeRootFrame">
|
||||||
|
|
||||||
@@ -56,10 +59,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingEnd="16dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingLeft="0dp"
|
android:paddingLeft="0dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingStart="0dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/buttonDiscard"
|
android:id="@+id/buttonDiscard"
|
||||||
@@ -76,3 +79,4 @@
|
|||||||
android:text="@string/save" />
|
android:text="@string/save" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
Reference in New Issue
Block a user