Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
APDU tab search results correct alignment of entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxieds committed May 6, 2018
1 parent 4194511 commit 0e096a4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 30 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
applicationId "com.maxieds.chameleonminilivedebugger"
minSdkVersion 21
targetSdkVersion 27
versionCode 38
versionName "0.3.8"
versionCode 39
versionName "0.3.9"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1561,8 +1561,8 @@ public void actionButtonAPDUSearchCmd(View view) {
LinearLayout searchResult = (LinearLayout) LiveLoggerActivity.defaultInflater.inflate(R.layout.apdu_search_result, null);
String[] cmdDescParts = ApduUtils.fullInsList[cmd].apduCmdDesc.split("[\\(\\)]");
((TextView) searchResult.findViewById(R.id.apduCmdDesc)).setText(cmdDescParts[0]);
if(cmdDescParts.length > 1)
((TextView) searchResult.findViewById(R.id.apduCmdStd)).setText(cmdDescParts[1]);
//if(cmdDescParts.length > 1)
// ((TextView) searchResult.findViewById(R.id.apduCmdStd)).setText(cmdDescParts[1]);
((TextView) searchResult.findViewById(R.id.apduByteData)).setText(summaryStr.toLowerCase().split(" : ")[1]);
((Button) searchResult.findViewById(R.id.copyCmdButton)).setTag(Integer.toString(cmd));
layoutList.addView(searchResult);
Expand Down
39 changes: 16 additions & 23 deletions app/src/main/res/layout/apdu_search_result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
<RelativeLayout
android:background="?colorAccentHighlight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp"
android:weightSum="1"
android:orientation="horizontal">

<TextView
android:id="@+id/apduCmdDesc"
android:layout_width="wrap_content"
android:maxLength="20"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0.35"
android:layout_weight="0.50"
android:layout_alignParentLeft="true"
android:drawableLeft="@drawable/apdubullet16"
android:drawablePadding="5dp"
android:background="?colorAccentHighlight"
Expand All @@ -29,28 +33,14 @@
android:textStyle="normal"
android:typeface="monospace" />

<TextView
android:id="@+id/apduCmdStd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="0.25"
android:background="?colorAccentHighlight"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:singleLine="true"
android:text=""
android:textAllCaps="true"
android:textSize="12.5sp"
android:textStyle="normal"
android:typeface="monospace" />

<TextView
android:id="@+id/apduByteData"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0"
android:layout_weight="0.40"
android:gravity="center_vertical|right"
android:layout_toRightOf="@id/apduCmdDesc"
android:layout_toLeftOf="@id/copyCmdButton"
android:background="?colorAccentHighlight"
android:paddingLeft="3dp"
android:paddingRight="3dp"
Expand All @@ -64,21 +54,24 @@
<Button
android:id="@+id/copyCmdButton"
android:layout_height="wrap_content"
android:layout_weight="0.10"
android:minHeight="0dp"
android:layout_width="wrap_content"
android:layout_gravity="right"
android:padding="0dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:layout_margin="0dp"
android:layout_alignParentRight="true"
android:drawableLeft="@drawable/copysquare16"
android:background="?colorAccentHighlight"
android:textAllCaps="true"
android:textSize="12.5sp"
android:textStyle="normal"
android:onClick="actionButtonAPDUCopyCmd"
android:text="COPY CMD" />
android:text="COPY" />

</LinearLayout>
</RelativeLayout>

<View
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.2'
}

}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Dec 31 08:01:59 EST 2017
#Sun May 06 15:04:08 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 0e096a4

Please sign in to comment.