Skip to content

Commit a56be15

Browse files
committed
another one
1 parent 45ef8e4 commit a56be15

File tree

10 files changed

+259
-20
lines changed

10 files changed

+259
-20
lines changed

.idea/codeStyles/Project.xml

Lines changed: 139 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/nadav.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/dev/bwt/NativeBitcoinWalletTracker.kt

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package dev.bwt
2+
3+
class NativeBitcoinWalletTracker {
4+
init {
5+
System.loadLibrary("bwt")
6+
}
7+
8+
external fun helloWorld(x: String): String;
9+
external fun start(jsonConfig: String, callback: CallbackNotifier): Long;
10+
external fun shutdown(shutdownPtr: Long);
11+
}
12+
13+
interface CallbackNotifier {
14+
fun onBooting() {};
15+
fun onSyncProgress(progress: Float, tip: Int) {};
16+
fun onScanProgress(progress: Float, eta: Int) {};
17+
fun onElectrumReady(addr: String) {};
18+
fun onHttpReady(addr: String) {};
19+
fun onReady() {};
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package dev.bwt.app
2+
3+
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
import androidx.preference.PreferenceFragmentCompat
6+
7+
class SettingsActivity : AppCompatActivity() {
8+
9+
override fun onCreate(savedInstanceState: Bundle?) {
10+
super.onCreate(savedInstanceState)
11+
setContentView(R.layout.settings_activity)
12+
if (savedInstanceState == null) {
13+
supportFragmentManager
14+
.beginTransaction()
15+
.replace(R.id.settings, SettingsFragment())
16+
.commit()
17+
}
18+
supportActionBar?.setDisplayHomeAsUpEnabled(true)
19+
}
20+
21+
class SettingsFragment : PreferenceFragmentCompat() {
22+
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
23+
setPreferencesFromResource(R.xml.root_preferences, rootKey)
24+
}
25+
}
26+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent">
4+
5+
<FrameLayout
6+
android:id="@+id/settings"
7+
android:layout_width="match_parent"
8+
android:layout_height="match_parent" />
9+
</LinearLayout>

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<resources>
2+
<!-- Reply Preference -->
3+
<string-array name="reply_entries">
4+
<item>Reply</item>
5+
<item>Reply to all</item>
6+
</string-array>
7+
8+
<string-array name="reply_values">
9+
<item>reply</item>
10+
<item>reply_all</item>
11+
</string-array>
12+
</resources>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
2+
3+
<PreferenceCategory app:title="@string/messages_header">
4+
5+
<EditTextPreference
6+
app:key="signature"
7+
app:title="@string/signature_title"
8+
app:useSimpleSummaryProvider="true" />
9+
10+
<ListPreference
11+
app:defaultValue="reply"
12+
app:entries="@array/reply_entries"
13+
app:entryValues="@array/reply_values"
14+
app:key="reply"
15+
app:title="@string/reply_title"
16+
app:useSimpleSummaryProvider="true" />
17+
18+
</PreferenceCategory>
19+
20+
<PreferenceCategory app:title="@string/sync_header">
21+
22+
<SwitchPreferenceCompat
23+
app:key="sync"
24+
app:title="@string/sync_title" />
25+
26+
<SwitchPreferenceCompat
27+
app:dependency="sync"
28+
app:key="attachment"
29+
app:summaryOff="@string/attachment_summary_off"
30+
app:summaryOn="@string/attachment_summary_on"
31+
app:title="@string/attachment_title" />
32+
33+
</PreferenceCategory>
34+
35+
</PreferenceScreen>

0 commit comments

Comments
 (0)