Skip to content

Commit 0e096a4

Browse files
committed
APDU tab search results correct alignment of entries.
1 parent 4194511 commit 0e096a4

File tree

5 files changed

+23
-30
lines changed

5 files changed

+23
-30
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ android {
2626
applicationId "com.maxieds.chameleonminilivedebugger"
2727
minSdkVersion 21
2828
targetSdkVersion 27
29-
versionCode 38
30-
versionName "0.3.8"
29+
versionCode 39
30+
versionName "0.3.9"
3131
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3232
multiDexEnabled true
3333
}

app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,8 +1561,8 @@ public void actionButtonAPDUSearchCmd(View view) {
15611561
LinearLayout searchResult = (LinearLayout) LiveLoggerActivity.defaultInflater.inflate(R.layout.apdu_search_result, null);
15621562
String[] cmdDescParts = ApduUtils.fullInsList[cmd].apduCmdDesc.split("[\\(\\)]");
15631563
((TextView) searchResult.findViewById(R.id.apduCmdDesc)).setText(cmdDescParts[0]);
1564-
if(cmdDescParts.length > 1)
1565-
((TextView) searchResult.findViewById(R.id.apduCmdStd)).setText(cmdDescParts[1]);
1564+
//if(cmdDescParts.length > 1)
1565+
// ((TextView) searchResult.findViewById(R.id.apduCmdStd)).setText(cmdDescParts[1]);
15661566
((TextView) searchResult.findViewById(R.id.apduByteData)).setText(summaryStr.toLowerCase().split(" : ")[1]);
15671567
((Button) searchResult.findViewById(R.id.copyCmdButton)).setTag(Integer.toString(cmd));
15681568
layoutList.addView(searchResult);

app/src/main/res/layout/apdu_search_result.xml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66
android:layout_height="wrap_content"
77
android:orientation="vertical">
88

9-
<LinearLayout
9+
<RelativeLayout
10+
android:background="?colorAccentHighlight"
1011
android:layout_width="match_parent"
1112
android:layout_height="wrap_content"
1213
android:padding="0dp"
14+
android:weightSum="1"
1315
android:orientation="horizontal">
1416

1517
<TextView
1618
android:id="@+id/apduCmdDesc"
1719
android:layout_width="wrap_content"
20+
android:maxLength="20"
1821
android:layout_height="wrap_content"
1922
android:layout_gravity="left"
20-
android:layout_weight="0.35"
23+
android:layout_weight="0.50"
24+
android:layout_alignParentLeft="true"
2125
android:drawableLeft="@drawable/apdubullet16"
2226
android:drawablePadding="5dp"
2327
android:background="?colorAccentHighlight"
@@ -29,28 +33,14 @@
2933
android:textStyle="normal"
3034
android:typeface="monospace" />
3135

32-
<TextView
33-
android:id="@+id/apduCmdStd"
34-
android:layout_width="wrap_content"
35-
android:layout_height="wrap_content"
36-
android:layout_gravity="right"
37-
android:layout_weight="0.25"
38-
android:background="?colorAccentHighlight"
39-
android:paddingLeft="3dp"
40-
android:paddingRight="3dp"
41-
android:singleLine="true"
42-
android:text=""
43-
android:textAllCaps="true"
44-
android:textSize="12.5sp"
45-
android:textStyle="normal"
46-
android:typeface="monospace" />
47-
4836
<TextView
4937
android:id="@+id/apduByteData"
50-
android:layout_width="wrap_content"
38+
android:layout_width="fill_parent"
5139
android:layout_height="wrap_content"
52-
android:layout_gravity="left"
53-
android:layout_weight="0"
40+
android:layout_weight="0.40"
41+
android:gravity="center_vertical|right"
42+
android:layout_toRightOf="@id/apduCmdDesc"
43+
android:layout_toLeftOf="@id/copyCmdButton"
5444
android:background="?colorAccentHighlight"
5545
android:paddingLeft="3dp"
5646
android:paddingRight="3dp"
@@ -64,21 +54,24 @@
6454
<Button
6555
android:id="@+id/copyCmdButton"
6656
android:layout_height="wrap_content"
57+
android:layout_weight="0.10"
6758
android:minHeight="0dp"
6859
android:layout_width="wrap_content"
6960
android:layout_gravity="right"
7061
android:padding="0dp"
7162
android:layout_marginTop="0dp"
7263
android:layout_marginBottom="0dp"
64+
android:layout_margin="0dp"
65+
android:layout_alignParentRight="true"
7366
android:drawableLeft="@drawable/copysquare16"
7467
android:background="?colorAccentHighlight"
7568
android:textAllCaps="true"
7669
android:textSize="12.5sp"
7770
android:textStyle="normal"
7871
android:onClick="actionButtonAPDUCopyCmd"
79-
android:text="COPY CMD" />
72+
android:text="COPY" />
8073

81-
</LinearLayout>
74+
</RelativeLayout>
8275

8376
<View
8477
android:layout_width="match_parent"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.1'
10+
classpath 'com.android.tools.build:gradle:3.1.2'
1111
}
1212

1313
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Dec 31 08:01:59 EST 2017
1+
#Sun May 06 15:04:08 EDT 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)