This repository has been archived by the owner on Sep 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
149 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
# MHW itemData.itm Editor | ||
But Android Application | ||
|
||
You can only view items in itemData.itm yet | ||
You can download from release page | ||
|
||
![other](https://pbs.twimg.com/media/EA6dmiPVAAEbp9L.jpg:small) | ||
![jp](https://pbs.twimg.com/media/EA6dmNeUwAAz0bz.jpg:small) | ||
Don't need original `itemData.itm` file | ||
|
||
## Built-In itemData.itm | ||
* chunk0 | ||
* chunk3 | ||
* chunk5 | ||
* chunk7 | ||
* chunk9 | ||
* chunk10 | ||
|
||
## features | ||
* view items | ||
* edit carry, sell and buy values | ||
* save | ||
|
||
## Languages | ||
* English (default) | ||
* Japanese | ||
|
||
## screenshots | ||
![](https://pbs.twimg.com/media/EA_Q9nVUEAA91QN.jpg:small) | ||
![](https://pbs.twimg.com/media/EA_Q98xU0AAce83.jpg:small) | ||
![](https://pbs.twimg.com/media/EA_Q-RoUcAIVhLF.jpg:small) | ||
|
||
## screenshots (jp) | ||
[ツイートみて](https://twitter.com/sugtao4423/status/1157373360222818304) |
37 changes: 37 additions & 0 deletions
37
app/src/main/java/sugtao4423/mhwitemdataeditor/ItemClicked.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package sugtao4423.mhwitemdataeditor | ||
|
||
import android.content.Context | ||
import android.support.design.widget.TextInputEditText | ||
import android.support.v7.app.AlertDialog | ||
import android.view.View | ||
|
||
class ItemClicked : ItemListAdapter.OnItemClickListener { | ||
|
||
override fun onItemClicked(context: Context, itemListAdapter: ItemListAdapter, position: Int) { | ||
val item = itemListAdapter.data[position] | ||
|
||
val editorView = View.inflate(context, R.layout.item_edit, null) | ||
val editCarry = editorView.findViewById<TextInputEditText>(R.id.carry) | ||
val editSell = editorView.findViewById<TextInputEditText>(R.id.sell) | ||
val editBuy = editorView.findViewById<TextInputEditText>(R.id.buy) | ||
|
||
editCarry.setText(item.carry.toString()) | ||
editSell.setText(item.sell.toString()) | ||
editBuy.setText(item.buy.toString()) | ||
|
||
AlertDialog.Builder(context).apply { | ||
setTitle(ItemDataUtils.getItemName(context, item)) | ||
setView(editorView) | ||
setNegativeButton(R.string.cancel, null) | ||
setPositiveButton(R.string.ok) { _, _ -> | ||
item.carry = editCarry.text.toString().toInt() | ||
item.sell = editSell.text.toString().toInt() | ||
item.buy = editBuy.text.toString().toInt() | ||
|
||
itemListAdapter.notifyItemChanged(position) | ||
} | ||
show() | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="8dp"> | ||
|
||
<android.support.design.widget.TextInputLayout | ||
android:id="@+id/carryLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="8dp"> | ||
|
||
<android.support.design.widget.TextInputEditText | ||
android:id="@+id/carry" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ems="10" | ||
android:hint="@string/carry" | ||
android:inputType="number" | ||
android:maxLines="1" /> | ||
|
||
</android.support.design.widget.TextInputLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@+id/carryLayout" | ||
android:layout_marginTop="16dp" | ||
android:baselineAligned="false" | ||
android:orientation="horizontal"> | ||
|
||
<android.support.design.widget.TextInputLayout | ||
android:id="@+id/sellLayout" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1"> | ||
|
||
<android.support.design.widget.TextInputEditText | ||
android:id="@+id/sell" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ems="8" | ||
android:hint="@string/sell" | ||
android:inputType="number" | ||
android:maxLines="1" /> | ||
|
||
</android.support.design.widget.TextInputLayout> | ||
|
||
<android.support.design.widget.TextInputLayout | ||
android:id="@+id/buyLayout" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1"> | ||
|
||
<android.support.design.widget.TextInputEditText | ||
android:id="@+id/buy" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ems="8" | ||
android:hint="@string/buy" | ||
android:inputType="number" | ||
android:maxLines="1" /> | ||
|
||
</android.support.design.widget.TextInputLayout> | ||
|
||
</LinearLayout> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters