mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Added emojis to tasks (including edit forms)
This commit is contained in:
parent
fa70b58e00
commit
4b519c893b
12 changed files with 26 additions and 22 deletions
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_height="72dp"
|
||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:id="@+id/task_text_edittext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
android:layout_height="72dp"
|
||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:id="@+id/task_notes_edittext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
android:layout_height="72dp"
|
||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:id="@+id/task_value_edittext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:id="@+id/new_checklist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
android:id="@+id/delete_item_button"
|
||||
android:text="x" />
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/item_edittext"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
android:button="@drawable/daily_checkbox"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@
|
|||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/checklistIndicatorWrapper"
|
||||
android:layout_toStartOf="@+id/checklistIndicatorWrapper">
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{daily.text}" />
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_weight="8"
|
||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||
|
||||
<EditText
|
||||
<com.rockerhieu.emojicon.EmojiconEditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -73,14 +73,14 @@
|
|||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{habit.text}" />
|
||||
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -51,14 +51,14 @@
|
|||
android:layout_toRightOf="@+id/imageView3"
|
||||
android:layout_toEndOf="@+id/imageView3">
|
||||
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{reward.text}"/>
|
||||
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -52,14 +52,14 @@
|
|||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<CheckedTextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{todo.text}" />
|
||||
|
||||
<TextView
|
||||
<com.rockerhieu.emojicon.EmojiconTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction;
|
|||
import com.raizlabs.android.dbflow.runtime.transaction.TransactionListener;
|
||||
import com.raizlabs.android.dbflow.sql.builder.Condition;
|
||||
import com.raizlabs.android.dbflow.sql.language.Select;
|
||||
import com.rockerhieu.emojicon.EmojiconEditText;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
|
@ -64,7 +65,7 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
private CheckListAdapter checklistAdapter;
|
||||
|
||||
@Bind(R.id.task_value_edittext)
|
||||
EditText taskValue;
|
||||
EmojiconEditText taskValue;
|
||||
|
||||
@Bind(R.id.task_value_layout)
|
||||
TextInputLayout taskValueLayout;
|
||||
|
|
@ -82,10 +83,10 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
LinearLayout mainWrapper;
|
||||
|
||||
@Bind(R.id.task_text_edittext)
|
||||
EditText taskText;
|
||||
EmojiconEditText taskText;
|
||||
|
||||
@Bind(R.id.task_notes_edittext)
|
||||
EditText taskNotes;
|
||||
EmojiconEditText taskNotes;
|
||||
|
||||
@Bind(R.id.task_difficulty_spinner)
|
||||
Spinner taskDifficultySpinner;
|
||||
|
|
@ -121,7 +122,7 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
RecyclerView recyclerView;
|
||||
|
||||
@Bind(R.id.new_checklist)
|
||||
EditText newCheckListEditText;
|
||||
EmojiconEditText newCheckListEditText;
|
||||
|
||||
@Bind(R.id.add_checklist_button)
|
||||
Button button;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.habitrpg.android.habitica.events.commands.CreateTagCommand;
|
|||
import com.habitrpg.android.habitica.ui.helpers.ViewHelper;
|
||||
import com.mikepenz.materialdrawer.model.BasePrimaryDrawerItem;
|
||||
import com.mikepenz.materialdrawer.model.utils.ViewHolderFactory;
|
||||
import com.rockerhieu.emojicon.EmojiconEditText;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
|
|
@ -56,7 +57,7 @@ public class EditTextDrawer extends BasePrimaryDrawerItem<EditTextDrawer> {
|
|||
View view;
|
||||
|
||||
@Bind(R.id.editText)
|
||||
EditText editText;
|
||||
EmojiconEditText editText;
|
||||
|
||||
@Bind(R.id.btnAdd)
|
||||
Button btnAdd;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.habitrpg.android.habitica.R;
|
|||
import com.habitrpg.android.habitica.ui.helpers.ItemTouchHelperAdapter;
|
||||
import com.habitrpg.android.habitica.ui.helpers.ItemTouchHelperViewHolder;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.tasks.ChecklistItem;
|
||||
import com.rockerhieu.emojicon.EmojiconEditText;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
@ -80,7 +81,7 @@ public class CheckListAdapter extends RecyclerView.Adapter<CheckListAdapter.Item
|
|||
ItemTouchHelperViewHolder, Button.OnClickListener {
|
||||
|
||||
@Bind(R.id.item_edittext)
|
||||
EditText checkListTextView;
|
||||
EmojiconEditText checkListTextView;
|
||||
|
||||
@Bind(R.id.delete_item_button)
|
||||
Button deleteButton;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import com.raizlabs.android.dbflow.runtime.transaction.TransactionListener;
|
|||
import com.raizlabs.android.dbflow.sql.builder.Condition;
|
||||
import com.raizlabs.android.dbflow.sql.language.OrderBy;
|
||||
import com.raizlabs.android.dbflow.sql.language.Select;
|
||||
import com.rockerhieu.emojicon.EmojiconTextView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
|
@ -408,7 +409,7 @@ public class HabitItemRecyclerViewAdapter<THabitItem extends Task>
|
|||
for (ChecklistItem item : this.Item.checklist) {
|
||||
LinearLayout itemView = (LinearLayout) layoutInflater.inflate(R.layout.checklist_item_row, null);
|
||||
CheckBox checkbox = (CheckBox) itemView.findViewById(R.id.checkBox);
|
||||
TextView textView = (TextView) itemView.findViewById(R.id.checkedTextView);
|
||||
EmojiconTextView textView = (EmojiconTextView) itemView.findViewById(R.id.checkedTextView);
|
||||
// Populate the data into the template view using the data object
|
||||
textView.setText(item.getText());
|
||||
checkbox.setChecked(item.getCompleted());
|
||||
|
|
|
|||
Loading…
Reference in a new issue