Skip to content

Commit

Permalink
[Fix] Fixed crash when long clicking certain VN elements.
Browse files Browse the repository at this point in the history
[#] Updated version to 2.2.2.
  • Loading branch information
herbeth1u committed May 1, 2017
1 parent 7cfe432 commit 83b1d93
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Binary file modified app/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ android {
applicationId "com.booboot.vndbandroid"
minSdkVersion 17
targetSdkVersion 25
versionCode 32
versionName "2.2.1"
versionCode 33
versionName "2.2.2"

renderscriptTargetApi 19
renderscriptSupportModeEnabled true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,16 @@ public boolean onItemLongClick(AdapterView<?> parent, View view, int position, l
if (view.getId() == R.id.list_item_text_layout) {
TextView itemLeftText = (TextView) view.findViewById(R.id.itemLeftText);
TextView itemRightText = (TextView) view.findViewById(R.id.itemRightText);
String copiedText = "";

String copiedText = itemLeftText.getText().toString();
if (!itemRightText.getText().toString().isEmpty())
copiedText += " : " + itemRightText.getText().toString();
if (itemLeftText != null && itemLeftText.getText() != null) {
copiedText = itemLeftText.getText().toString();
}

if (itemRightText != null && itemRightText.getText() != null && !itemRightText.getText().toString().isEmpty()) {
if (!copiedText.isEmpty()) copiedText += " : ";
copiedText += itemRightText.getText().toString();
}

ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("CLIPBOARD", copiedText);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/list_item_subtitle.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/list_item_text_layout"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 83b1d93

Please sign in to comment.