Skip to content

Commit efba703

Browse files
jmljml
jml
authored and
jml
committed
button size
1 parent 984286b commit efba703

File tree

5 files changed

+86
-48
lines changed

5 files changed

+86
-48
lines changed

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
android:icon="@mipmap/ic_launcher"
3030
android:label="@string/app_name"
3131
android:roundIcon="@mipmap/ic_launcher_round"
32+
android:logo="@drawable/logo"
3233
android:supportsRtl="true"
3334
android:theme="@style/Theme.SignYourApk"
3435
tools:targetApi="34"

app/src/main/java/com/cod5/signyourapk/MainActivity.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import android.content.Intent;
1010
import android.content.pm.PackageManager;
1111
import android.content.res.AssetManager;
12-
import android.icu.util.Output;
1312
import android.net.Uri;
1413
import android.os.Build;
1514
import android.os.Bundle;
@@ -29,7 +28,6 @@
2928
import com.cod5.signyourapk.databinding.ActivityMainBinding;
3029
import net.fornwall.apksigner.Main;
3130

32-
import java.io.Console;
3331
import java.io.File;
3432
import java.io.FileOutputStream;
3533
import java.io.IOException;
@@ -79,7 +77,6 @@ private void listDownloadsFiles() {
7977
}
8078
}
8179
}
82-
8380
}
8481

8582
/* print result of permission request */
@@ -177,11 +174,11 @@ public void onClickMe(View v) {
177174
} else {
178175
File cert = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/certificate.jks");
179176
Log.d("Sign(v1):", cert.getPath() + " " + binding.passwd.getText().toString() + " " + rdb.getText().toString());
180-
Main.main(new String[]{"-p", binding.passwd.getText().toString(),
177+
Main.main("-p", binding.passwd.getText().toString(),
181178
cert.getPath(),
182179
rdb.getText().toString(),
183180
rdb.getText().toString() + "-signed.apk"
184-
});
181+
);
185182
binding.sampleText.setText(R.string.apk_signed);
186183
}
187184

app/src/main/res/drawable/logo.xml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="28.575"
5+
android:viewportHeight="28.575">
6+
<path
7+
android:pathData="M4.908,14.175a9.687,9.719 0,1 0,19.374 0a9.687,9.719 0,1 0,-19.374 0z"
8+
android:strokeWidth="0"
9+
android:fillColor="#05f715"
10+
android:strokeColor="#4af89c"/>
11+
<path
12+
android:pathData="m15.111,16.597c-0.017,0 -0.003,-0.037 0,-0.041 0.05,-0.07 0.155,-0.01 0.191,0.041 0.121,0.172 -0.029,0.392 -0.191,0.468 -0.368,0.173 -0.762,-0.124 -0.883,-0.468 -0.226,-0.641 0.279,-1.276 0.883,-1.446 0.997,-0.281 1.942,0.501 2.163,1.446 0.337,1.438 -0.791,2.766 -2.163,3.042 -1.969,0.396 -3.753,-1.152 -4.086,-3.042 -0.456,-2.591 1.589,-4.91 4.086,-5.3 3.308,-0.517 6.24,2.102 6.69,5.3 0.58,4.121 -2.693,7.747 -6.69,8.259 -5.032,0.644 -9.436,-3.366 -10.01,-8.259"
13+
android:strokeWidth="2.265"
14+
android:fillColor="#00000000"
15+
android:strokeColor="#4a6af8"
16+
android:fillType="evenOdd"/>
17+
<path
18+
android:pathData="M4.385,3.288h11.055v1.045h-11.055z"
19+
android:strokeWidth="1.60729"
20+
android:fillColor="#ffffff"
21+
android:strokeColor="#4a6af8"/>
22+
<path
23+
android:pathData="M4.843,5.231h0.452v2.648h-0.452z"
24+
android:strokeWidth="2.265"
25+
android:fillColor="#ffffff"
26+
android:strokeColor="#4a6af8"/>
27+
<path
28+
android:pathData="M9.106,5.295h0.452v2.648h-0.452z"
29+
android:strokeWidth="2.265"
30+
android:fillColor="#ffffff"
31+
android:strokeColor="#4a6af8"/>
32+
<path
33+
android:pathData="M18.663,6.458a2.841,2.712 0,1 0,5.683 0a2.841,2.712 0,1 0,-5.683 0z"
34+
android:strokeWidth="2.265"
35+
android:fillColor="#ffffff"
36+
android:strokeColor="#4a6af8"/>
37+
</vector>

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

+44-43
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,57 @@
66
android:layout_height="match_parent"
77
tools:context=".MainActivity">
88

9-
<LinearLayout
10-
android:id="@+id/linearLayout"
9+
<ScrollView
1110
android:layout_width="match_parent"
1211
android:layout_height="match_parent"
13-
android:layout_marginStart="8dp"
14-
android:layout_marginLeft="8dp"
15-
android:layout_marginTop="24dp"
16-
android:layout_marginEnd="8dp"
17-
android:layout_marginRight="8dp"
18-
android:layout_marginBottom="16dp"
19-
android:orientation="vertical"
20-
app:layout_constraintBottom_toBottomOf="parent"
21-
app:layout_constraintEnd_toEndOf="parent"
22-
app:layout_constraintStart_toStartOf="parent"
23-
app:layout_constraintTop_toTopOf="parent">
12+
tools:layout_editor_absoluteX="8dp"
13+
tools:layout_editor_absoluteY="24dp">
2414

25-
<Button
26-
android:id="@+id/button"
27-
android:layout_width="wrap_content"
28-
android:layout_height="wrap_content"
29-
android:layout_marginStart="16dp"
30-
android:layout_marginLeft="16dp"
31-
android:layout_marginTop="16dp"
32-
android:layout_marginEnd="274dp"
33-
android:layout_marginRight="274dp"
34-
android:text="sign APK"
35-
app:layout_constraintBottom_toTopOf="@+id/sample_text"
36-
app:layout_constraintEnd_toEndOf="parent"
37-
app:layout_constraintStart_toStartOf="parent"
38-
app:layout_constraintTop_toTopOf="parent" />
39-
40-
<EditText
41-
android:id="@+id/passwd"
15+
<LinearLayout
4216
android:layout_width="match_parent"
4317
android:layout_height="wrap_content"
44-
android:ems="10"
45-
android:inputType="text"
46-
android:text="12345678" />
18+
android:orientation="vertical">
4719

48-
<TextView
49-
android:id="@+id/sample_text"
50-
android:layout_width="wrap_content"
51-
android:layout_height="wrap_content"
52-
android:text="Hello World!" />
20+
<Button
21+
android:id="@+id/button"
22+
android:layout_width="130dp"
23+
android:layout_height="68dp"
24+
android:layout_marginStart="16dp"
25+
android:layout_marginLeft="16dp"
26+
android:layout_marginTop="16dp"
27+
android:layout_marginEnd="16dp"
28+
android:layout_marginRight="16dp"
29+
android:text="sign APK"
30+
app:layout_constraintBottom_toTopOf="@+id/sample_text"
31+
app:layout_constraintEnd_toEndOf="parent"
32+
app:layout_constraintStart_toStartOf="parent"
33+
app:layout_constraintTop_toTopOf="parent" />
5334

54-
<RadioGroup
55-
android:id="@+id/radio"
56-
android:layout_width="match_parent"
57-
android:layout_height="match_parent" />
35+
<EditText
36+
android:id="@+id/passwd"
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content"
39+
android:ems="10"
40+
android:inputType="text"
41+
android:text="@string/the_password" />
42+
43+
<TextView
44+
android:id="@+id/sample_text"
45+
android:layout_width="match_parent"
46+
android:layout_height="wrap_content"
47+
android:layout_margin="2dp"
48+
android:text="@string/hello_world" />
5849

59-
</LinearLayout>
50+
<RadioGroup
51+
android:id="@+id/radio"
52+
android:layout_width="match_parent"
53+
android:layout_height="match_parent"
54+
android:isScrollContainer="true"
55+
android:scrollbarAlwaysDrawVerticalTrack="true"
56+
android:scrollbarStyle="insideInset"
57+
android:scrollbars="vertical"
58+
android:verticalScrollbarPosition="defaultPosition" />
59+
</LinearLayout>
60+
</ScrollView>
6061

6162
</androidx.constraintlayout.widget.ConstraintLayout>

app/src/main/res/values/strings.xml

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
<string name="apk_signed_v2">APK signed (v2) !</string>
77
<string name="please_select_an_apk">please select an APK</string>
88
<string name="failed">failed!</string>
9+
<string name="the_password">12345678</string>
10+
<string name="hello_world">Hello World!</string>
911
</resources>

0 commit comments

Comments
 (0)