Merge branch 'master', remote-tracking branch 'origin'

This commit is contained in:
David A. Velasco 2012-07-11 18:47:27 +02:00
commit f692bf7ae6
4 changed files with 62 additions and 71 deletions

View file

@ -1,70 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center|fill"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:id="@+id/user_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="new_name" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1" >
<Button
android:id="@+id/cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="@string/common_cancel" />
<Button
android:id="@+id/ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="@string/common_ok"
android:textColor="@android:color/black" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="clip_horizontal"
android:orientation="vertical" >
<EditText
android:id="@+id/user_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" >
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/common_cancel" />
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/common_ok" />
</LinearLayout>
</LinearLayout>

View file

@ -40,7 +40,9 @@
<EditText
android:id="@+id/txt1"
android:focusable="true"
style="@style/PassCodeStyle" />
style="@style/PassCodeStyle"
android:cursorVisible="true"
><requestFocus/></EditText>
<EditText
android:id="@+id/txt2"

View file

@ -21,6 +21,7 @@ import com.actionbarsherlock.app.SherlockFragmentActivity;
import eu.alefzero.owncloud.R;
import android.app.ActionBar.LayoutParams;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
@ -74,6 +75,7 @@ public class PinCodeActivity extends SherlockFragmentActivity {
mPinHdr = (TextView) findViewById(R.id.pinHdr);
mText1 = (EditText) findViewById(R.id.txt1);
mText1.requestFocus();
getWindow().setSoftInputMode(android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
mText2 = (EditText) findViewById(R.id.txt2);
mText3 = (EditText) findViewById(R.id.txt3);
mText4 = (EditText) findViewById(R.id.txt4);

View file

@ -64,6 +64,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.WindowManager.LayoutParams;
import android.webkit.MimeTypeMap;
import android.widget.Button;
import android.widget.CheckBox;
@ -726,6 +727,8 @@ public class FileDetailFragment extends SherlockFragment implements
((Button)v.findViewById(R.id.cancel)).setOnClickListener(this);
((Button)v.findViewById(R.id.ok)).setOnClickListener(this);
((TextView)v.findViewById(R.id.user_input)).setText(currentName);
((TextView)v.findViewById(R.id.user_input)).requestFocus();
getDialog().getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE);
mResult = false;
return v;