Adds Edit Monster placeholder fragment.
This commit is contained in:
		| @@ -60,6 +60,9 @@ android { | |||||||
|         sourceCompatibility JavaVersion.VERSION_1_8 |         sourceCompatibility JavaVersion.VERSION_1_8 | ||||||
|         targetCompatibility JavaVersion.VERSION_1_8 |         targetCompatibility JavaVersion.VERSION_1_8 | ||||||
|     } |     } | ||||||
|  |     buildFeatures { | ||||||
|  |         viewBinding true | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| dependencies { | dependencies { | ||||||
| @@ -73,6 +76,8 @@ dependencies { | |||||||
|     implementation "androidx.navigation:navigation-fragment:$nav_version" |     implementation "androidx.navigation:navigation-fragment:$nav_version" | ||||||
|     implementation "androidx.navigation:navigation-ui:$nav_version" |     implementation "androidx.navigation:navigation-ui:$nav_version" | ||||||
|     implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' |     implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | ||||||
|  |     implementation 'androidx.legacy:legacy-support-v4:1.0.0' | ||||||
|  |     implementation 'androidx.recyclerview:recyclerview:1.1.0' | ||||||
|  |  | ||||||
|     // Testing |     // Testing | ||||||
|     testImplementation 'junit:junit:4.13.2' |     testImplementation 'junit:junit:4.13.2' | ||||||
|   | |||||||
| @@ -0,0 +1,72 @@ | |||||||
|  | package com.majinnaibu.monstercards.placeholder; | ||||||
|  |  | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Helper class for providing sample content for user interfaces created by | ||||||
|  |  * Android template wizards. | ||||||
|  |  * <p> | ||||||
|  |  * TODO: Replace all uses of this class before publishing your app. | ||||||
|  |  */ | ||||||
|  | public class PlaceholderContent { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * An array of sample (placeholder) items. | ||||||
|  |      */ | ||||||
|  |     public static final List<PlaceholderItem> ITEMS = new ArrayList<PlaceholderItem>(); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * A map of sample (placeholder) items, by ID. | ||||||
|  |      */ | ||||||
|  |     public static final Map<String, PlaceholderItem> ITEM_MAP = new HashMap<String, PlaceholderItem>(); | ||||||
|  |  | ||||||
|  |     private static final int COUNT = 25; | ||||||
|  |  | ||||||
|  |     static { | ||||||
|  |         // Add some sample items. | ||||||
|  |         for (int i = 1; i <= COUNT; i++) { | ||||||
|  |             addItem(createPlaceholderItem(i)); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void addItem(PlaceholderItem item) { | ||||||
|  |         ITEMS.add(item); | ||||||
|  |         ITEM_MAP.put(item.id, item); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static PlaceholderItem createPlaceholderItem(int position) { | ||||||
|  |         return new PlaceholderItem(String.valueOf(position), "Item " + position, makeDetails(position)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static String makeDetails(int position) { | ||||||
|  |         StringBuilder builder = new StringBuilder(); | ||||||
|  |         builder.append("Details about Item: ").append(position); | ||||||
|  |         for (int i = 0; i < position; i++) { | ||||||
|  |             builder.append("\nMore details information here."); | ||||||
|  |         } | ||||||
|  |         return builder.toString(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * A placeholder item representing a piece of content. | ||||||
|  |      */ | ||||||
|  |     public static class PlaceholderItem { | ||||||
|  |         public final String id; | ||||||
|  |         public final String content; | ||||||
|  |         public final String details; | ||||||
|  |  | ||||||
|  |         public PlaceholderItem(String id, String content, String details) { | ||||||
|  |             this.id = id; | ||||||
|  |             this.content = content; | ||||||
|  |             this.details = details; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         @Override | ||||||
|  |         public String toString() { | ||||||
|  |             return content; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,72 @@ | |||||||
|  | package com.majinnaibu.monstercards.ui.monster; | ||||||
|  |  | ||||||
|  | import android.content.Context; | ||||||
|  | import android.os.Bundle; | ||||||
|  |  | ||||||
|  | import androidx.fragment.app.Fragment; | ||||||
|  | import androidx.recyclerview.widget.GridLayoutManager; | ||||||
|  | import androidx.recyclerview.widget.LinearLayoutManager; | ||||||
|  | import androidx.recyclerview.widget.RecyclerView; | ||||||
|  |  | ||||||
|  | import android.view.LayoutInflater; | ||||||
|  | import android.view.View; | ||||||
|  | import android.view.ViewGroup; | ||||||
|  |  | ||||||
|  | import com.majinnaibu.monstercards.R; | ||||||
|  | import com.majinnaibu.monstercards.placeholder.PlaceholderContent; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * A fragment representing a list of Items. | ||||||
|  |  */ | ||||||
|  | public class EditMonsterFragment extends Fragment { | ||||||
|  |  | ||||||
|  |     // TODO: Customize parameter argument names | ||||||
|  |     private static final String ARG_COLUMN_COUNT = "column-count"; | ||||||
|  |     // TODO: Customize parameters | ||||||
|  |     private int mColumnCount = 1; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Mandatory empty constructor for the fragment manager to instantiate the | ||||||
|  |      * fragment (e.g. upon screen orientation changes). | ||||||
|  |      */ | ||||||
|  |     public EditMonsterFragment() { | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // TODO: Customize parameter initialization | ||||||
|  |     @SuppressWarnings("unused") | ||||||
|  |     public static EditMonsterFragment newInstance(int columnCount) { | ||||||
|  |         EditMonsterFragment fragment = new EditMonsterFragment(); | ||||||
|  |         Bundle args = new Bundle(); | ||||||
|  |         args.putInt(ARG_COLUMN_COUNT, columnCount); | ||||||
|  |         fragment.setArguments(args); | ||||||
|  |         return fragment; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public void onCreate(Bundle savedInstanceState) { | ||||||
|  |         super.onCreate(savedInstanceState); | ||||||
|  |  | ||||||
|  |         if (getArguments() != null) { | ||||||
|  |             mColumnCount = getArguments().getInt(ARG_COLUMN_COUNT); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||||||
|  |                              Bundle savedInstanceState) { | ||||||
|  |         View view = inflater.inflate(R.layout.fragment_edit_monster_list, container, false); | ||||||
|  |  | ||||||
|  |         // Set the adapter | ||||||
|  |         if (view instanceof RecyclerView) { | ||||||
|  |             Context context = view.getContext(); | ||||||
|  |             RecyclerView recyclerView = (RecyclerView) view; | ||||||
|  |             if (mColumnCount <= 1) { | ||||||
|  |                 recyclerView.setLayoutManager(new LinearLayoutManager(context)); | ||||||
|  |             } else { | ||||||
|  |                 recyclerView.setLayoutManager(new GridLayoutManager(context, mColumnCount)); | ||||||
|  |             } | ||||||
|  |             recyclerView.setAdapter(new EditMonsterRecyclerViewAdapter(PlaceholderContent.ITEMS)); | ||||||
|  |         } | ||||||
|  |         return view; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,61 @@ | |||||||
|  | package com.majinnaibu.monstercards.ui.monster; | ||||||
|  |  | ||||||
|  | import androidx.recyclerview.widget.RecyclerView; | ||||||
|  |  | ||||||
|  | import android.view.LayoutInflater; | ||||||
|  | import android.view.ViewGroup; | ||||||
|  | import android.widget.TextView; | ||||||
|  |  | ||||||
|  | import com.majinnaibu.monstercards.placeholder.PlaceholderContent.PlaceholderItem; | ||||||
|  | import com.majinnaibu.monstercards.databinding.FragmentEditMonsterBinding; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * {@link RecyclerView.Adapter} that can display a {@link PlaceholderItem}. | ||||||
|  |  * TODO: Replace the implementation with code for your data type. | ||||||
|  |  */ | ||||||
|  | public class EditMonsterRecyclerViewAdapter extends RecyclerView.Adapter<EditMonsterRecyclerViewAdapter.ViewHolder> { | ||||||
|  |  | ||||||
|  |     private final List<PlaceholderItem> mValues; | ||||||
|  |  | ||||||
|  |     public EditMonsterRecyclerViewAdapter(List<PlaceholderItem> items) { | ||||||
|  |         mValues = items; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | ||||||
|  |  | ||||||
|  |         return new ViewHolder(FragmentEditMonsterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public void onBindViewHolder(final ViewHolder holder, int position) { | ||||||
|  |         holder.mItem = mValues.get(position); | ||||||
|  |         holder.mIdView.setText(mValues.get(position).id); | ||||||
|  |         holder.mContentView.setText(mValues.get(position).content); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public int getItemCount() { | ||||||
|  |         return mValues.size(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public class ViewHolder extends RecyclerView.ViewHolder { | ||||||
|  |         public final TextView mIdView; | ||||||
|  |         public final TextView mContentView; | ||||||
|  |         public PlaceholderItem mItem; | ||||||
|  |  | ||||||
|  |         public ViewHolder(FragmentEditMonsterBinding binding) { | ||||||
|  |             super(binding.getRoot()); | ||||||
|  |             mIdView = binding.itemNumber; | ||||||
|  |             mContentView = binding.content; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         @Override | ||||||
|  |         public String toString() { | ||||||
|  |             return super.toString() + " '" + mContentView.getText() + "'"; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -10,14 +10,16 @@ import android.util.TypedValue; | |||||||
| import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||||
| import android.view.Menu; | import android.view.Menu; | ||||||
| import android.view.MenuInflater; | import android.view.MenuInflater; | ||||||
|  | import android.view.MenuItem; | ||||||
| import android.view.View; | import android.view.View; | ||||||
| import android.view.ViewGroup; | import android.view.ViewGroup; | ||||||
| import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||||
| import android.widget.TextView; | import android.widget.TextView; | ||||||
|  |  | ||||||
| import androidx.annotation.NonNull; | import androidx.annotation.NonNull; | ||||||
| import androidx.annotation.Nullable; |  | ||||||
| import androidx.lifecycle.ViewModelProvider; | import androidx.lifecycle.ViewModelProvider; | ||||||
|  | import androidx.navigation.NavDirections; | ||||||
|  | import androidx.navigation.Navigation; | ||||||
|  |  | ||||||
| import com.majinnaibu.monstercards.R; | import com.majinnaibu.monstercards.R; | ||||||
| import com.majinnaibu.monstercards.data.MonsterRepository; | import com.majinnaibu.monstercards.data.MonsterRepository; | ||||||
| @@ -235,4 +237,16 @@ public class MonsterDetailFragment extends MCFragment { | |||||||
|         inflater.inflate(R.menu.monster_detail_menu, menu); |         inflater.inflate(R.menu.monster_detail_menu, menu); | ||||||
|         super.onCreateOptionsMenu(menu, inflater); |         super.onCreateOptionsMenu(menu, inflater); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public boolean onOptionsItemSelected(@NonNull MenuItem item) { | ||||||
|  |         if (item.getItemId() == R.id.menu_action_edit_monster) { | ||||||
|  |             NavDirections action = MonsterDetailFragmentDirections.actionNavigationMonsterToEditMonsterFragment(monsterDetailViewModel.getId().toString()); | ||||||
|  |             View view = getView(); | ||||||
|  |             assert view != null; | ||||||
|  |             Navigation.findNavController(view).navigate(action); | ||||||
|  |             return true; | ||||||
|  |         } | ||||||
|  |         return super.onOptionsItemSelected(item); | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -8,6 +8,7 @@ import com.majinnaibu.monstercards.models.Monster; | |||||||
|  |  | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  | import java.util.UUID; | ||||||
|  |  | ||||||
| public class MonsterDetailViewModel extends ViewModel { | public class MonsterDetailViewModel extends ViewModel { | ||||||
|  |  | ||||||
| @@ -57,6 +58,8 @@ public class MonsterDetailViewModel extends ViewModel { | |||||||
|         mStrength.setValue(""); |         mStrength.setValue(""); | ||||||
|         mWisdom = new MutableLiveData<>(); |         mWisdom = new MutableLiveData<>(); | ||||||
|         mWisdom.setValue(""); |         mWisdom.setValue(""); | ||||||
|  |         mMonsterId = new MutableLiveData<>(); | ||||||
|  |         mMonsterId.setValue(UUID.fromString("00000000-0000-0000-0000-000000000000")); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private MutableLiveData<List<String>> mAbilities; |     private MutableLiveData<List<String>> mAbilities; | ||||||
| @@ -148,6 +151,12 @@ public class MonsterDetailViewModel extends ViewModel { | |||||||
|         return mWisdom; |         return mWisdom; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private final MutableLiveData<UUID> mMonsterId; | ||||||
|  |  | ||||||
|  |     public LiveData<UUID> getId() { | ||||||
|  |         return mMonsterId; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private Monster mMonster; |     private Monster mMonster; | ||||||
|     public void setMonster(Monster monster) { |     public void setMonster(Monster monster) { | ||||||
|         mMonster = monster; |         mMonster = monster; | ||||||
|   | |||||||
| @@ -1,189 +1,20 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|     xmlns:app="http://schemas.android.com/apk/res-auto" |     android:layout_width="wrap_content" | ||||||
|     xmlns:tools="http://schemas.android.com/tools" |     android:layout_height="wrap_content" | ||||||
|     android:layout_width="match_parent" |     android:orientation="horizontal"> | ||||||
|     android:layout_height="match_parent"> |  | ||||||
|  |  | ||||||
|     <LinearLayout |     <TextView | ||||||
|         android:layout_width="match_parent" |         android:id="@+id/item_number" | ||||||
|  |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:divider="?android:attr/dividerVertical" |         android:layout_margin="@dimen/text_margin" | ||||||
|         android:dividerPadding="@dimen/text_margin" |         android:textAppearance="?attr/textAppearanceListItem" /> | ||||||
|         android:orientation="vertical" |  | ||||||
|         android:showDividers="middle" |  | ||||||
|         tools:context=".ui.editmonster.EditMonsterFragment"> |  | ||||||
|  |  | ||||||
|         <TextView |     <TextView | ||||||
|             android:id="@+id/basicInfo" |         android:id="@+id/content" | ||||||
|             android:layout_width="match_parent" |         android:layout_width="wrap_content" | ||||||
|             android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|             android:layout_margin="@dimen/text_margin" |         android:layout_margin="@dimen/text_margin" | ||||||
|             android:text="@string/label_basic_info" |         android:textAppearance="?attr/textAppearanceListItem" /> | ||||||
|             android:textSize="@dimen/text_h4_size" | </LinearLayout> | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/armor" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_armor" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/speed" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_speed" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/abilityScores" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_ability_scores" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/savingThrows" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_saving_throws" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/skills" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_skills" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/conditionImmunities" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_condition_immunities" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/damageImmunities" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_damage_immunities" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/damageResistances" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_damage_resistances" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/damageVulnerabilities" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_damage_vulnerabilities" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/senses" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_senses" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/languages" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_languages" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/challengeRating" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_challenge_rating" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/abilities" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_abilities" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/actions" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_actions" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/reactions" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_reactions" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/legendaryActions" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_legendary_actions" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/lairActions" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_lair_actions" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|         <TextView |  | ||||||
|             android:id="@+id/regionalActions" |  | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="wrap_content" |  | ||||||
|             android:layout_margin="@dimen/text_margin" |  | ||||||
|             android:text="@string/label_regional_effects" |  | ||||||
|             android:textSize="@dimen/text_h4_size" |  | ||||||
|             app:drawableEndCompat="@drawable/ic_chevron_right_24" /> |  | ||||||
|  |  | ||||||
|     </LinearLayout> |  | ||||||
| </ScrollView> |  | ||||||
| @@ -0,0 +1,13 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||||
|  | <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|  |     xmlns:app="http://schemas.android.com/apk/res-auto" | ||||||
|  |     xmlns:tools="http://schemas.android.com/tools" | ||||||
|  |     android:id="@+id/list" | ||||||
|  |     android:name="com.majinnaibu.monstercards.EditMonsterFragment" | ||||||
|  |     android:layout_width="match_parent" | ||||||
|  |     android:layout_height="match_parent" | ||||||
|  |     android:layout_marginLeft="16dp" | ||||||
|  |     android:layout_marginRight="16dp" | ||||||
|  |     app:layoutManager="LinearLayoutManager" | ||||||
|  |     tools:context=".ui.monster.EditMonsterFragment" | ||||||
|  |     tools:listitem="@layout/fragment_edit_monster" /> | ||||||
| @@ -3,6 +3,7 @@ | |||||||
|     xmlns:android="http://schemas.android.com/apk/res/android"> |     xmlns:android="http://schemas.android.com/apk/res/android"> | ||||||
|  |  | ||||||
|     <item |     <item | ||||||
|  |         android:id="@+id/menu_action_edit_monster" | ||||||
|         android:icon="@drawable/ic_edit_24" |         android:icon="@drawable/ic_edit_24" | ||||||
|         android:title="@string/action_edit" |         android:title="@string/action_edit" | ||||||
|         app:showAsAction="always" /> |         app:showAsAction="always" /> | ||||||
|   | |||||||
| @@ -49,6 +49,22 @@ | |||||||
|         android:id="@+id/navigation_monster" |         android:id="@+id/navigation_monster" | ||||||
|         android:name="com.majinnaibu.monstercards.ui.monster.MonsterDetailFragment" |         android:name="com.majinnaibu.monstercards.ui.monster.MonsterDetailFragment" | ||||||
|         android:label="Monster" |         android:label="Monster" | ||||||
|         tools:layout="@layout/fragment_monster" /> |         tools:layout="@layout/fragment_monster"> | ||||||
|  |         <argument | ||||||
|  |             android:name="monster_id" | ||||||
|  |             app:argType="string" /> | ||||||
|  |         <action | ||||||
|  |             android:id="@+id/action_navigation_monster_to_editMonsterFragment" | ||||||
|  |             app:destination="@id/editMonsterFragment" /> | ||||||
|  |     </fragment> | ||||||
|  |     <fragment | ||||||
|  |         android:id="@+id/editMonsterFragment" | ||||||
|  |         android:name="com.majinnaibu.monstercards.ui.monster.EditMonsterFragment" | ||||||
|  |         android:label="fragment_edit_monster_list" | ||||||
|  |         tools:layout="@layout/fragment_edit_monster_list" > | ||||||
|  |         <argument | ||||||
|  |             android:name="monster_id" | ||||||
|  |             app:argType="string" /> | ||||||
|  |     </fragment> | ||||||
|  |  | ||||||
| </navigation> | </navigation> | ||||||
		Reference in New Issue
	
	Block a user
	 Tom Hicks
						Tom Hicks