Skip to content

Commit

Permalink
A few changes:
Browse files Browse the repository at this point in the history
 * Updated styles in Settings.java to copy the look of a Preferences activity. Removed cancel and save buttons and just called the save to the settings in onPause().
 * Removed a bunch of unused strings.
 * Fixed a few lint warnings and errors.
  • Loading branch information
roundhill committed Mar 1, 2013
1 parent c481244 commit 41e9e43
Show file tree
Hide file tree
Showing 16 changed files with 389 additions and 536 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ res/values-th/strings.xml -text
res/values-tr/strings.xml -text
res/values-v11/colors.xml -text
res/values-v11/styles.xml -text
res/values-v14/styles.xml -text
res/values-xlarge-v11/styles.xml -text
res/values-zh-rTW/strings.xml -text
res/values-zh/strings.xml -text
Expand Down
2 changes: 1 addition & 1 deletion res/drawable/section_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="#AAAAAA" />
<solid android:color="#c9c9c9" />
</shape>
</item>
<item android:bottom="2dp">
Expand Down
1 change: 0 additions & 1 deletion res/layout/add_category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp">
Expand Down
295 changes: 133 additions & 162 deletions res/layout/settings.xml
Original file line number Diff line number Diff line change
@@ -1,184 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainRL"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFFFF"
android:orientation="vertical" >

<ScrollView
<RelativeLayout
android:id="@+id/settings"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFFFF"
android:fillViewport="true" >
android:layout_height="wrap_content"
android:padding="@dimen/settings_padding" >

<RelativeLayout
android:id="@+id/settings"
android:id="@+id/section1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/l_section1"
style="@style/WordPressSettingsSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/account_details" />

<EditText
android:id="@+id/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_section1"
android:hint="@string/username"
android:singleLine="true" />

<EditText
android:id="@+id/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/username"
android:hint="@string/password"
android:inputType="textPassword"
android:singleLine="true" />

<TextView
android:id="@+id/l_httpuser"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/password"
android:text="@string/http_credentials" />

<EditText
android:id="@+id/httpuser"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_httpuser"
android:singleLine="true"
android:hint="@string/httpuser" />

<EditText
android:id="@+id/httppassword"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/httpuser"
android:inputType="textPassword"
android:singleLine="true"
android:hint="@string/httppassword" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/section2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="@dimen/settings_padding" >
android:layout_below="@id/section1"
android:layout_marginTop="8dp" >

<RelativeLayout
android:id="@+id/section1"
<TextView
android:id="@+id/l_section2"
style="@style/WordPressSettingsSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/l_section1"
style="@style/WordPressSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/account_details" />

<EditText
android:id="@+id/username"
android:hint="@string/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_section1"
android:singleLine="true" />

<EditText
android:id="@+id/password"
android:hint="@string/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/username"
android:inputType="textPassword"
android:singleLine="true" />

<TextView
android:id="@+id/l_httpuser"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/password"
android:text="@string/httpuser" />

<EditText
android:id="@+id/httpuser"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_httpuser"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:singleLine="true" />

<TextView
android:id="@+id/l_httppassword"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/httpuser"
android:text="@string/httppassword" />

<EditText
android:id="@+id/httppassword"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_httppassword"
android:inputType="textPassword"
android:singleLine="true" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/section2"
android:layout_height="wrap_content"
android:text="@string/media" />

<TextView
android:id="@+id/l_maxImageWidth"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/section1"
android:layout_marginTop="8dp" >

<TextView
android:id="@+id/l_section2"
style="@style/WordPressSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/media" />

<TextView
android:id="@+id/l_maxImageWidth"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_section2"
android:text="@string/max_thumbnail_px_width" />

<Spinner
android:id="@+id/maxImageWidth"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:layout_below="@id/l_maxImageWidth" />

<CheckBox
android:id="@+id/fullSizeImage"
android:layout_marginTop="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/maxImageWidth"
android:text="@string/upload_full_size_image" />
<CheckBox
android:id="@+id/scaledImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/fullSizeImage"
android:text="@string/upload_scaled_image" />
<TextView
android:id="@+id/l_scaledImage"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/scaledImage"
android:text="@string/scaled_image" />
<EditText
android:id="@+id/scaledImageWidth"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_scaledImage"
android:numeric="integer"
android:maxLength="4"
android:singleLine="true" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/section3"
android:layout_below="@id/l_section2"
android:text="@string/max_thumbnail_px_width" />

<Spinner
android:id="@+id/maxImageWidth"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/section2"
android:layout_marginTop="8dp" >

<TextView
android:id="@+id/l_section3"
style="@style/WordPressSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/location" />

<CheckBox
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/l_section3"
android:text="@string/geotag" />
</RelativeLayout>

<Button
android:id="@+id/save"
android:layout_below="@id/l_maxImageWidth"
android:paddingLeft="12dp" />

<CheckBox
android:id="@+id/fullSizeImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/maxImageWidth"
android:layout_marginTop="8dp"
android:text="@string/upload_full_size_image" />

<CheckBox
android:id="@+id/scaledImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/section3"
android:layout_marginLeft="8dp"
android:text="@string/save"
android:textSize="18sp" />

<Button
android:id="@+id/cancel"
android:layout_below="@id/fullSizeImage"
android:text="@string/upload_scaled_image" />

<TextView
android:id="@+id/l_scaledImage"
style="@style/WordPressSubHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/scaledImage"
android:text="@string/scaled_image" />

<EditText
android:id="@+id/scaledImageWidth"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/l_scaledImage"
android:maxLength="4"
android:numeric="integer"
android:singleLine="true" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/section3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/section2"
android:layout_marginTop="8dp" >

<TextView
android:id="@+id/l_section3"
style="@style/WordPressSettingsSectionHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/location" />

<CheckBox
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/save"
android:layout_toLeftOf="@id/save"
android:text="@string/cancel"
android:textSize="18sp" />
android:layout_below="@id/l_section3"
android:text="@string/geotag" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</RelativeLayout>

</ScrollView>
Loading

0 comments on commit 41e9e43

Please sign in to comment.