Skip to content

Commit

Permalink
Minor fixes for testnet release
Browse files Browse the repository at this point in the history
  • Loading branch information
brugeman committed Mar 13, 2020
1 parent 7452b19 commit b1c59e3
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ build
.idea
*~
*.aar
*.apk
*.apk
*.aab
13 changes: 9 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ android {
applicationId 'org.lndroid.wallet'
minSdkVersion 18
targetSdkVersion 29
versionCode 1
versionName '0.1.0'
versionCode 2
versionName '0.1.1'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

manifestPlaceholders = [AppName:"Lndroid.Wallet"]
manifestPlaceholders = [AppName: "Lndroid.Wallet"]

javaCompileOptions {
annotationProcessorOptions {
Expand All @@ -32,7 +32,12 @@ android {
tstnet {
dimension = 'net'
applicationIdSuffix = '.testnet'
manifestPlaceholders = [AppName:"Lndroid.Wallet (Testnet)"]
manifestPlaceholders = [AppName: "Lndroid.Wallet (Testnet)"]
versionNameSuffix = '-testnet'
}
mainnet {
dimension = 'net'
versionNameSuffix = '-beta'
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:roundIcon="@drawable/ic_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar">
<activity android:name=".init.CreateRootActivity"></activity>
<activity android:name=".AboutActivity"></activity>
<activity android:name=".init.CreateRootActivity" />
<activity android:name=".init.GenSeedActivity" />
<activity android:name=".init.InitActivity" />
<activity android:name=".UnlockActivity" />
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/java/org/lndroid/wallet/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.lndroid.wallet;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.os.Bundle;
import android.widget.TextView;

public class AboutActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);

Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("About");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

TextView version = findViewById(R.id.version);
version.setText("Version: "+BuildConfig.VERSION_NAME);
}
}
10 changes: 6 additions & 4 deletions app/src/main/java/org/lndroid/wallet/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ private void startGetWalletInfo() {
startActivity(intent);
}

private void startAbout() {
Intent intent = new Intent(this, AboutActivity.class);
startActivity(intent);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
Expand Down Expand Up @@ -266,11 +271,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
case R.id.menuUtxo:
startListUtxo();
return true;
case R.id.menuHelp:
// showHelp();
return true;
case R.id.menuAbout:
// showAbout();
startAbout();
return true;
default:
return super.onOptionsItemSelected(item);
Expand Down
52 changes: 52 additions & 0 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.lndroid.wallet.AboutActivity">

<include layout="@layout/toolbar" android:id="@+id/toolbarLayout"/>

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:text="Lndroid.Wallet"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toolbarLayout" />

<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:text="Developer-focused Bitcoin Lightning Network wallet with an open API.\n
https://lndroid.org/\n
https://github.com/lndroid\n
Twitter: @LndroidOrg"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@+id/title" />

<TextView
android:id="@+id/version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:text="Version"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@+id/text" />


</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 0 additions & 4 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
android:title="UTXO"
app:showAsAction="never"
/>
<item android:id="@+id/menuHelp"
android:title="Help"
app:showAsAction="never"
/>
<item android:id="@+id/menuAbout"
android:title="About"
app:showAsAction="never"
Expand Down
1 change: 0 additions & 1 deletion app/tstnet/release/output.json

This file was deleted.

0 comments on commit b1c59e3

Please sign in to comment.