[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectCategory and AddCategory activities refreshed #21

Merged
merged 13 commits into from
Jul 31, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added res/drawable-hdpi/ic_content_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_content_remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_level_indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_content_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_content_remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_level_indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_content_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_content_remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_level_indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_level_indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions res/layout/add_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:src="@drawable/wpcom" />

<RelativeLayout
android:id="@+id/section1"
android:id="@+id/sectionContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/wpcomLogo"
Expand Down Expand Up @@ -93,7 +93,7 @@
android:id="@+id/l_wordpressdotcom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/section1"
android:layout_below="@id/sectionContent"
android:layout_centerHorizontal="true"
android:layout_marginTop="24dp"
android:shadowColor="#FFFFFF"
Expand Down
2 changes: 1 addition & 1 deletion res/layout/add_account_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:paddingRight="10dip" >

<RelativeLayout
android:id="@+id/section1"
android:id="@+id/sectionContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10dip"
Expand Down
14 changes: 7 additions & 7 deletions res/layout/blog_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:paddingRight="@dimen/settings_padding" >

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

Expand Down Expand Up @@ -69,10 +69,10 @@
</RelativeLayout>

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

<TextView
Expand Down Expand Up @@ -131,10 +131,10 @@
</RelativeLayout>

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

<TextView
Expand All @@ -153,10 +153,10 @@
</RelativeLayout>

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

<TextView
Expand Down
33 changes: 22 additions & 11 deletions res/layout/categories_row.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:textColor="#464646"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:checkMark="?android:attr/listChoiceIndicatorMultiple" />

<org.wordpress.android.util.CheckedLinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/category_row_height"
android:orientation="horizontal"
android:id="@+id/categoryRow" android:clickable="false">
<ImageView android:layout_width="@dimen/category_row_height"
android:layout_height="@dimen/category_row_height"
android:src="@drawable/ic_level_indicator"
android:id="@+id/categoryRowLevelIndicator" android:scaleType="fitEnd"/>
<CheckedTextView
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:textColor="#464646"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:id="@+id/categoryRowText"/>
</org.wordpress.android.util.CheckedLinearLayout>
8 changes: 8 additions & 0 deletions res/layout/category_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Button
xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/categoryButton"
android:drawableRight="@drawable/ic_content_remove" android:paddingEnd="5dp"/>
9 changes: 9 additions & 0 deletions res/layout/category_select_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Button
xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/selectCategories"
android:drawableRight="@drawable/ic_content_new"
android:tag="select-category"/>
35 changes: 16 additions & 19 deletions res/layout/edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:padding="8dp" >

<LinearLayout
android:id="@+id/section1"
android:id="@+id/sectionContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
Expand All @@ -45,11 +45,11 @@
</LinearLayout>

<LinearLayout
android:id="@+id/section2"
android:id="@+id/sectionTags"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="vertical" >
android:orientation="vertical">

<EditText
android:id="@+id/tags"
Expand All @@ -59,25 +59,22 @@
android:hint="@string/tags_separate_with_commas"
android:inputType="textAutoCorrect" />

<Button
android:id="@+id/selectCategories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/select_categories" />

<TextView
android:id="@+id/selectedCategories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:text="@string/selected_categories"
android:textColor="#444444"
android:visibility="gone" />
android:id="@+id/categoryLabel"
style="@style/WordPressSubHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/category" />

</LinearLayout>

<org.wordpress.android.util.FlowLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/sectionCategories" android:paddingLeft="8dp">
</org.wordpress.android.util.FlowLayout>

<RelativeLayout
android:id="@+id/section3"
android:id="@+id/sectionLocation"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="10dp"
Expand Down Expand Up @@ -127,7 +124,7 @@
</RelativeLayout>

<LinearLayout
android:id="@+id/section4"
android:id="@+id/sectionSettings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
Expand Down
2 changes: 1 addition & 1 deletion res/layout/edit_comment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:paddingTop="8dp" >

<RelativeLayout
android:id="@+id/section1"
android:id="@+id/sectionContent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
Expand Down
11 changes: 11 additions & 0 deletions res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="FlowLayout">
<attr name="horizontalSpacing" format="dimension"/>
<attr name="verticalSpacing" format="dimension"/>
</declare-styleable>
<declare-styleable name="FlowLayout_LayoutParams">
<attr name="layout_horizontalSpacing" format="dimension"/>
<attr name="layout_verticalSpacing" format="dimension"/>
</declare-styleable>
</resources>
1 change: 1 addition & 0 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
<dimen name="menu_shadow_width">4dp</dimen>
<dimen name="add_account_width">-1dp</dimen>
<dimen name="refresh_icon_padding">12dp</dimen>
<dimen name="category_row_height">60dp</dimen>
</resources>
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
<string name="media">Media</string>

<!-- category management -->
<string name="category">Category</string>
<string name="add_new_category">Add New Category</string>
<string name="category_name">Category Name</string>
<string name="category_slug">Category Slug (optional)</string>
Expand Down
Loading