Skip to content

Commit bd011ab

Browse files
committed
#98: Sync with Nextcloud
1 parent 81398ab commit bd011ab

File tree

20 files changed

+4588
-413
lines changed

20 files changed

+4588
-413
lines changed

java/.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@
99
/project.properties
1010
/target/
1111
/libs/armeabi/
12-
/rust-keylock-android-java.iml
12+
*.iml
1313
/libs/
14+
/.gradle/
15+
/.idea/
16+
/gradle/
17+
*gradle*
18+

java/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
android:targetSdkVersion="16" />
1010

1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
12+
<uses-permission android:name="android.permission.INTERNET" />
1213

1314
<application
1415
android:allowBackup="true"

java/assets/certs/rkl_cacert.pem

Lines changed: 3467 additions & 0 deletions
Large diffs are not rendered by default.

java/res/drawable-hdpi/ok.png

812 Bytes
Loading
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:id="@+id/EditConfigurationLayout"
4+
android:layout_width="fill_parent"
5+
android:layout_height="fill_parent"
6+
android:layout_gravity="center"
7+
android:gravity="top"
8+
android:orientation="vertical"
9+
android:paddingBottom="@dimen/activity_vertical_margin"
10+
android:paddingLeft="@dimen/activity_horizontal_margin"
11+
android:paddingRight="@dimen/activity_horizontal_margin"
12+
android:paddingTop="@dimen/activity_vertical_margin"
13+
tools:context="org.astonbitecode.rustkeylock.MainActivity">
14+
15+
<ScrollView
16+
android:id="@+id/scrollViewEditConfiguration"
17+
android:layout_width="match_parent"
18+
android:layout_height="match_parent">
19+
20+
<LinearLayout
21+
android:layout_width="match_parent"
22+
android:layout_height="match_parent"
23+
android:orientation="vertical">
24+
25+
<TextView
26+
android:id="@+id/editConfigurationLabel"
27+
android:layout_width="wrap_content"
28+
android:layout_height="wrap_content"
29+
android:layout_gravity="center"
30+
android:text="Configuration"
31+
android:textAppearance="?android:attr/textAppearanceLarge"/>
32+
33+
<TextView
34+
android:id="@+id/nextcloudLabel"
35+
android:layout_width="wrap_content"
36+
android:layout_height="wrap_content"
37+
android:layout_gravity="left"
38+
android:text="Nextcloud"
39+
android:textAppearance="?android:attr/textAppearanceMedium"/>
40+
41+
<TextView
42+
android:id="@+id/urlLabel"
43+
android:layout_width="wrap_content"
44+
android:layout_height="wrap_content"
45+
android:layout_marginTop="20sp"
46+
android:text="Server URL"
47+
android:textAppearance="?android:attr/textAppearanceSmall"/>
48+
49+
<EditText
50+
android:id="@+id/editNextcloudUrl"
51+
android:layout_width="match_parent"
52+
android:layout_height="wrap_content"
53+
android:inputType="text"/>
54+
55+
<TextView
56+
android:id="@+id/userLabel"
57+
android:layout_width="wrap_content"
58+
android:layout_height="wrap_content"
59+
android:layout_marginTop="10sp"
60+
android:text="Username"
61+
android:textAppearance="?android:attr/textAppearanceSmall"/>
62+
63+
<EditText
64+
android:id="@+id/editNextcloudUser"
65+
android:layout_width="match_parent"
66+
android:layout_height="wrap_content"
67+
android:inputType="text"/>
68+
69+
<TextView
70+
android:id="@+id/passwordLabel"
71+
android:layout_width="wrap_content"
72+
android:layout_height="wrap_content"
73+
android:layout_marginTop="10sp"
74+
android:text="Password"
75+
android:textAppearance="?android:attr/textAppearanceSmall"/>
76+
77+
<EditText
78+
android:id="@+id/editNextcloudPassword"
79+
android:layout_width="match_parent"
80+
android:layout_height="wrap_content"
81+
android:inputType="text"/>
82+
83+
<CheckBox android:id="@+id/editNextcloudUseSelfSignedCert" android:layout_width="match_parent"
84+
android:layout_height="match_parent"
85+
android:text="Use self-signed certificate"/>
86+
87+
<GridLayout
88+
android:layout_width="match_parent"
89+
android:layout_height="wrap_content"
90+
android:layout_gravity="center"
91+
android:layout_marginTop="20sp"
92+
android:columnCount="2"
93+
android:gravity="center|top"
94+
android:orientation="horizontal">
95+
96+
<Button
97+
android:id="@+id/editConfigurationOkButton"
98+
android:layout_width="wrap_content"
99+
android:layout_height="wrap_content"
100+
android:layout_gravity="left"
101+
android:background="@android:color/transparent"
102+
android:drawableTop="@drawable/ok"
103+
android:text="Edit"/>
104+
105+
<Button
106+
android:id="@+id/editConfigurationCancelButton"
107+
android:layout_width="wrap_content"
108+
android:layout_height="wrap_content"
109+
android:layout_gravity="right"
110+
android:background="@android:color/transparent"
111+
android:drawableTop="@drawable/close"
112+
android:text="Cancel"/>
113+
</GridLayout>
114+
</LinearLayout>
115+
</ScrollView>
116+
117+
</LinearLayout>

java/res/layout/fragment_main_menu.xml

Lines changed: 78 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,98 @@
11
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:tools="http://schemas.android.com/tools"
3-
android:id="@+id/MainMenuLayout"
4-
android:layout_width="match_parent"
5-
android:layout_height="match_parent"
6-
android:layout_gravity="center"
7-
android:gravity="center|top"
8-
android:orientation="vertical"
9-
android:paddingBottom="@dimen/activity_vertical_margin"
10-
android:paddingLeft="@dimen/activity_horizontal_margin"
11-
android:paddingRight="@dimen/activity_horizontal_margin"
12-
android:paddingTop="@dimen/activity_vertical_margin"
13-
tools:context="org.astonbitecode.rustkeylock.MainActivity" >
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:id="@+id/MainMenuLayout"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:layout_gravity="center"
7+
android:gravity="center|top"
8+
android:orientation="vertical"
9+
android:paddingBottom="@dimen/activity_vertical_margin"
10+
android:paddingLeft="@dimen/activity_horizontal_margin"
11+
android:paddingRight="@dimen/activity_horizontal_margin"
12+
android:paddingTop="@dimen/activity_vertical_margin"
13+
tools:context="org.astonbitecode.rustkeylock.MainActivity">
1414

1515
<ScrollView
16-
android:id="@+id/scrollViewMainMenu"
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content" >
16+
android:id="@+id/scrollViewMainMenu"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content">
1919

2020
<GridLayout
21-
android:layout_width="match_parent"
22-
android:layout_height="wrap_content"
23-
android:columnCount="1"
24-
android:gravity="center|top"
25-
android:orientation="vertical" >
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:columnCount="1"
24+
android:gravity="center|top"
25+
android:orientation="vertical">
2626

2727
<Button
28-
android:id="@+id/listButton"
29-
android:layout_width="wrap_content"
30-
android:layout_height="wrap_content"
31-
android:layout_gravity="fill_horizontal"
32-
android:layout_marginTop="20sp"
33-
android:background="@android:color/transparent"
34-
android:drawableTop="@drawable/circled_list"
35-
android:text="Passwords" />
28+
android:id="@+id/listButton"
29+
android:layout_width="wrap_content"
30+
android:layout_height="wrap_content"
31+
android:layout_gravity="fill_horizontal"
32+
android:layout_marginTop="20sp"
33+
android:background="@android:color/transparent"
34+
android:drawableTop="@drawable/circled_list"
35+
android:text="Passwords"/>
3636

3737
<Button
38-
android:id="@+id/saveButton"
39-
android:layout_width="wrap_content"
40-
android:layout_height="wrap_content"
41-
android:layout_gravity="fill_horizontal"
42-
android:layout_marginTop="20sp"
43-
android:background="@android:color/transparent"
44-
android:drawableTop="@drawable/save"
45-
android:text="Encrypt and Save" />
38+
android:id="@+id/saveButton"
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
android:layout_gravity="fill_horizontal"
42+
android:layout_marginTop="20sp"
43+
android:background="@android:color/transparent"
44+
android:drawableTop="@drawable/save"
45+
android:text="Encrypt and Save"/>
4646

4747
<Button
48-
android:id="@+id/changePasswordButton"
49-
android:layout_width="wrap_content"
50-
android:layout_height="wrap_content"
51-
android:layout_gravity="fill_horizontal"
52-
android:layout_marginTop="20sp"
53-
android:background="@android:color/transparent"
54-
android:drawableTop="@drawable/edit"
55-
android:text="Change master password" />
48+
android:id="@+id/changePasswordButton"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:layout_gravity="fill_horizontal"
52+
android:layout_marginTop="20sp"
53+
android:background="@android:color/transparent"
54+
android:drawableTop="@drawable/edit"
55+
android:text="Change master password"/>
5656

5757
<Button
58-
android:id="@+id/exportButton"
59-
android:layout_width="wrap_content"
60-
android:layout_height="wrap_content"
61-
android:layout_gravity="fill_horizontal"
62-
android:layout_marginTop="20sp"
63-
android:background="@android:color/transparent"
64-
android:drawableTop="@drawable/export"
65-
android:text="Export to..." />
58+
android:id="@+id/exportButton"
59+
android:layout_width="wrap_content"
60+
android:layout_height="wrap_content"
61+
android:layout_gravity="fill_horizontal"
62+
android:layout_marginTop="20sp"
63+
android:background="@android:color/transparent"
64+
android:drawableTop="@drawable/export"
65+
android:text="Export to..."/>
6666

6767
<Button
68-
android:id="@+id/importButton"
69-
android:layout_width="wrap_content"
70-
android:layout_height="wrap_content"
71-
android:layout_gravity="fill_horizontal"
72-
android:layout_marginTop="20sp"
73-
android:background="@android:color/transparent"
74-
android:drawableTop="@drawable/importimg"
75-
android:text="Import from..." />
68+
android:id="@+id/importButton"
69+
android:layout_width="wrap_content"
70+
android:layout_height="wrap_content"
71+
android:layout_gravity="fill_horizontal"
72+
android:layout_marginTop="20sp"
73+
android:background="@android:color/transparent"
74+
android:drawableTop="@drawable/importimg"
75+
android:text="Import from..."/>
7676

7777
<Button
78-
android:id="@+id/exitButton"
79-
android:layout_width="wrap_content"
80-
android:layout_height="wrap_content"
81-
android:layout_gravity="fill_horizontal"
82-
android:layout_marginTop="20sp"
83-
android:background="@android:color/transparent"
84-
android:drawableTop="@drawable/close"
85-
android:text="Exit" />
78+
android:id="@+id/mmEditConfigurationButton"
79+
android:layout_width="wrap_content"
80+
android:layout_height="wrap_content"
81+
android:layout_gravity="fill_horizontal"
82+
android:layout_marginTop="20sp"
83+
android:background="@android:color/transparent"
84+
android:drawableTop="@drawable/settings"
85+
android:text="Configuration"/>
86+
87+
<Button
88+
android:id="@+id/exitButton"
89+
android:layout_width="wrap_content"
90+
android:layout_height="wrap_content"
91+
android:layout_gravity="fill_horizontal"
92+
android:layout_marginTop="20sp"
93+
android:background="@android:color/transparent"
94+
android:drawableTop="@drawable/close"
95+
android:text="Exit"/>
8696
</GridLayout>
8797
</ScrollView>
8898

0 commit comments

Comments
 (0)