mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 12:18:59 +00:00
Merge branch 'develop' of https://github.com/HabitRPG/habitrpg-android into develop
This commit is contained in:
commit
4f2c8cde7b
7 changed files with 30 additions and 12 deletions
|
|
@ -49,8 +49,8 @@
|
|||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding"
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
android:minHeight="@dimen/task_min_height">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
@ -56,8 +57,8 @@
|
|||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp">
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<TextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
|
|
|
|||
|
|
@ -42,10 +42,15 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<CheckedTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
|
|
|
|||
|
|
@ -44,4 +44,5 @@
|
|||
<dimen name="checkbox_size">30dp</dimen>
|
||||
|
||||
<dimen name="login_field_width">350dp</dimen>
|
||||
<dimen name="task_top_bottom_padding">20dp</dimen>
|
||||
</resources>
|
||||
|
|
@ -166,6 +166,12 @@ public class MainActivity extends InstabugAppCompatActivity implements HabitRPGU
|
|||
drawer.setSelection(MainDrawerBuilder.SIDEBAR_PURCHASE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
mAPIHelper.retrieveUser(new HabitRPGUserCallback(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
|
||||
private void createCheckListRecyclerView() {
|
||||
List<ChecklistItem> checklistItems = new ArrayList<>();
|
||||
if (task.getChecklist() != null) {
|
||||
if (task != null && task.getChecklist() != null) {
|
||||
checklistItems = task.getChecklist();
|
||||
}
|
||||
checklistAdapter = new CheckListAdapter(checklistItems);
|
||||
|
|
@ -302,7 +302,12 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
private boolean saveTask(Task task) {
|
||||
task.text = taskText.getText().toString();
|
||||
|
||||
task.setChecklist(checklistAdapter.getCheckListItems());
|
||||
if (checklistAdapter != null) {
|
||||
if (checklistAdapter.getCheckListItems() != null) {
|
||||
task.setChecklist(checklistAdapter.getCheckListItems());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (task.text.isEmpty())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public class TasksFragment extends BaseFragment implements TaskScoringCallback.O
|
|||
.withCloseOnClick(false)
|
||||
.append(activity.drawer);
|
||||
|
||||
filterDrawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
||||
filterDrawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED, Gravity.RIGHT);
|
||||
|
||||
viewPager.setCurrentItem(0);
|
||||
this.tagsHelper = new TagsHelper();
|
||||
|
|
@ -682,8 +682,8 @@ public class TasksFragment extends BaseFragment implements TaskScoringCallback.O
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
filterDrawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||
|
||||
DrawerLayout layout = filterDrawer.getDrawerLayout();
|
||||
layout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, Gravity.RIGHT);
|
||||
super.onDestroyView();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue