File tree Expand file tree Collapse file tree 8 files changed +37
-0
lines changed
src/main/java/org/astonbitecode/rustkeylock/fragments Expand file tree Collapse file tree 8 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 119119 android : drawableTop =" @drawable/dropbox_circle_black_64" />
120120 </GridLayout >
121121
122+ <GridLayout
123+ android : layout_width =" match_parent"
124+ android : layout_height =" wrap_content"
125+ android : layout_gravity =" center"
126+ android : layout_marginTop =" 20sp"
127+ android : columnCount =" 1"
128+ android : gravity =" center|top"
129+ android : orientation =" horizontal" >
130+
131+ <TextView
132+ android : id =" @+id/clearConfigurationsLabel"
133+ android : layout_width =" wrap_content"
134+ android : layout_height =" wrap_content"
135+ android : layout_gravity =" center"
136+ android : text =" @string/clear_all_configurations"
137+ android : textAppearance =" ?android:attr/textAppearanceSmall" />
138+
139+ <Button
140+ android : id =" @+id/clearConfigurationsButton"
141+ android : layout_marginTop =" 18sp"
142+ android : layout_width =" wrap_content"
143+ android : layout_height =" wrap_content"
144+ android : layout_gravity =" center"
145+ android : background =" @android:color/transparent"
146+ android : drawableTop =" @drawable/clean" />
147+ </GridLayout >
148+
122149 <GridLayout
123150 android : layout_width =" match_parent"
124151 android : layout_height =" wrap_content"
Original file line number Diff line number Diff line change 55 <string name =" welcome" >Welcome to rust-keylock</string >
66 <string name =" action_settings" >Settings</string >
77 <string name =" dbx_app_key" >7git6ovjwtdbfvm</string >
8+ <string name =" clear_all_configurations" >Clear all configurations</string >
89
910</resources >
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ public void onClick(View view) {
8383 String appKey = getString (R .string .dbx_app_key );
8484 Log .d (TAG , "Clicked Get Dropbox token in configuration. App key: " + appKey );
8585 Auth .startOAuth2Authentication (getActivity (), appKey );
86+ } else if (view .getId () == R .id .clearConfigurationsButton ) {
87+ Log .d (TAG , "Clicked clear configurations in configuration." );
88+ nextcloudUrlText .setText ("" );
89+ nextcloudUsernameText .setText ("" );
90+ nextcloudPasswordText .setText ("" );
91+ useSelfSignedCert .setChecked (false );
92+ strings .set (5 , "" );
8693 }
8794 }
8895
@@ -107,6 +114,8 @@ private void prepareUiElements(View v) {
107114 cb .setOnClickListener (this );
108115 Button gt = (Button ) v .findViewById (R .id .editConfigurationGetTokenButton );
109116 gt .setOnClickListener (this );
117+ Button cc = (Button ) v .findViewById (R .id .clearConfigurationsButton );
118+ cc .setOnClickListener (this );
110119
111120 EditText urlText = (EditText ) v .findViewById (R .id .editNextcloudUrl );
112121 urlText .setText (strings .get (0 ));
You can’t perform that action at this time.
0 commit comments