android:layout_weight="0.75"\r
android:hint="@string/setup_hint_address"\r
android:inputType="textUri"\r
+ android:textColor="@android:color/black"\r
android:singleLine="true" >\r
\r
<requestFocus>\r
\r
</EditText>\r
</TableRow>\r
+ <TableRow android:id="@+id/tableRow5"\r
+ android:layout_width="fill_parent"\r
+ android:layout_height="wrap_content"\r
+ android:gravity="center_horizontal"\r
+ android:weightSum="1.0">\r
+ \r
+ <CheckBox\r
+ android:id="@+id/show_password"\r
+ android:layout_width="fill_parent"\r
+ android:layout_height="wrap_content"\r
+ android:layout_weight=".75"\r
+ android:hint="@string/setup_hint_show_password"\r
+ android:textColor="@android:color/black"\r
+ android:onClick="onCheckboxClick"/>\r
+ \r
+ </TableRow>\r
</TableLayout>\r
\r
<LinearLayout\r
android:layout_height="wrap_content"\r
android:layout_weight=".50"\r
android:onClick="onOkClick"\r
+ android:textColor="@android:color/black"\r
android:text="@string/setup_btn_connect" >\r
</Button>\r
</LinearLayout>\r
<string name="setup_hint_username">Username</string>
<string name="setup_hint_password">Password</string>
<string name="setup_hint_address">Web address</string>
+ <string name="setup_hint_show_password">Show password?</string>
<string name="setup_title">Connect to your ownCloud</string>
<string name="setup_btn_connect">Connect</string>
<string name="uploader_btn_upload_text">Upload</string>
import android.graphics.Color;\r
import android.os.Bundle;\r
import android.os.Handler;\r
+import android.text.InputType;\r
import android.util.Log;\r
import android.view.View;\r
import android.view.Window;\r
+import android.widget.CheckBox;\r
import android.widget.TextView;\r
import android.widget.Toast;\r
import eu.alefzero.owncloud.R;\r
mHandler,\r
AuthenticatorActivity.this);\r
}\r
+ \r
+ /**\r
+ * Handles the show password checkbox\r
+ * @author robstar\r
+ * @param view\r
+ */\r
+ public void onCheckboxClick(View view) {\r
+ CheckBox checkbox = (CheckBox) findViewById(R.id.show_password);\r
+ TextView password_text = (TextView) findViewById(R.id.account_password);\r
+ \r
+ if(checkbox.isChecked()) {\r
+ password_text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);\r
+ } else {\r
+ password_text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\r
+ }\r
+ \r
+ }\r
}\r