Bladeren bron

New styles applied to all views of the gallery section.

seavenois 9 jaren geleden
bovenliggende
commit
37d634e0cb

+ 1 - 1
app/src/main/java/com/ivalentin/margolariak/PhotoLayout.java

@@ -204,7 +204,7 @@ public class PhotoLayout extends Fragment {
 		}
 		else {
 			//If not,  set placeholder image, create directories and download asynchronously
-			imageView.setImageResource(getResources().getIdentifier("com.ivalentin.margolariak:drawable/pinpoint_gm", null, null));
+			imageView.setImageResource(getResources().getIdentifier("com.ivalentin.margolariak:drawable/photo_placeholder", null, null));
 			File fpath;
 			fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/view/");
 			fpath.mkdirs();

+ 55 - 29
app/src/main/res/layout/fragment_layout_album.xml

@@ -5,47 +5,73 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    >
 
     <LinearLayout
-        android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:paddingBottom="15dp"
-        android:paddingLeft="7dp"
-        android:paddingTop="7dp"
-        android:paddingRight="7dp">
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
             android:id="@+id/tv_album_title"
-            android:textStyle="bold"/>
-
-        <WebView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
-            android:id="@+id/wv_album_description"
-            android:layout_margin="7dp"
-            android:background="@drawable/entry"
-            android:padding="7dp" />
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"
+            android:background="@drawable/section_title"
+            android:paddingBottom="4dp"
+            android:paddingEnd="10dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:paddingStart="20dp"
+            android:paddingTop="4dp"
+            android:textColor="@color/section_title"
+            android:layout_marginBottom="-1.3dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="10dp"/>
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginLeft="7dp"
-            android:layout_marginTop="15dp"
-            android:layout_marginRight="7dp"
-            android:layout_marginBottom="7dp"
-            android:id="@+id/ll_album_list">
+            android:background="@drawable/section_large"
+            android:layout_marginBottom="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="0dp">
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
+
+                <WebView
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/wv_album_description"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="7dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="7dp"
+                android:layout_marginBottom="7dp"
+                android:id="@+id/ll_album_list">
+            </LinearLayout>
+
         </LinearLayout>
 
     </LinearLayout>

+ 169 - 146
app/src/main/res/layout/fragment_layout_photo.xml

@@ -2,198 +2,221 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:layout_height="wrap_content">
 
     <LinearLayout
         android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:paddingBottom="15dp"
-        android:paddingLeft="7dp"
-        android:paddingTop="7dp"
-        android:paddingRight="7dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:id="@+id/tv_photo_title"
-            android:textStyle="bold"/>
+        android:layout_height="fill_parent"
+        android:layout_marginBottom="10dp">
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:padding="7dp">
-
-            <ImageView
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content"
-                android:id="@+id/iv_photo"
-                android:contentDescription="@string/app_cdesc"
-                android:padding="2dp"
-                android:background="@color/album_border"
-                android:adjustViewBounds="true"
-                android:src="@drawable/photo_placeholder_preview"/>
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:text="Medium Text"
-                android:id="@+id/tv_photo_description"/>
+            android:layout_height="wrap_content"
+            android:background="@drawable/section"
+            android:layout_margin="10dp"
+            tools:ignore="UselessParent">
 
             <TextView
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:text="Small Text"
-                android:id="@+id/tv_photo_date"
-                android:layout_marginStart="15dp"
-                android:layout_marginBottom="15dp"
-                android:textStyle="italic"/>
+                android:id="@+id/tv_photo_title"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <LinearLayout
-                android:orientation="horizontal"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_gravity="center_horizontal"
-                android:gravity="center_horizontal"
-                android:padding="7dp">
+                android:layout_height="wrap_content"
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
-                <Button
-                    android:layout_width="wrap_content"
+                <ImageView
+                    android:layout_width="fill_parent"
                     android:layout_height="wrap_content"
-                    android:text="@string/blog_pager_previous"
-                    android:id="@+id/bt_photo_previous"
-                    android:background="@drawable/button_selector"
-                    android:textStyle="bold"
-                    android:textColor="@color/input_button_color"
-                    android:layout_gravity="center_horizontal"
-                    android:visibility="visible"
-                    android:layout_margin="5dp"
-                    tools:ignore="ButtonStyle"/>
+                    android:id="@+id/iv_photo"
+                    android:contentDescription="@string/app_cdesc"
+                    android:padding="2dp"
+                    android:background="@color/album_border"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/photo_placeholder_preview"/>
 
-                <Button
+                <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/blog_pager_next"
-                    android:id="@+id/bt_photo_next"
-                    android:background="@drawable/button_selector"
-                    android:textStyle="bold"
-                    android:textColor="@color/input_button_color"
-                    android:layout_gravity="center_horizontal"
-                    android:layout_margin="5dp"
-                    tools:ignore="ButtonStyle"/>
-            </LinearLayout>
-        </LinearLayout>
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:text="Medium Text"
+                    android:id="@+id/tv_photo_description"/>
 
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:layout_marginTop="15dp"
-            android:padding="7dp">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:text="Small Text"
+                    android:id="@+id/tv_photo_date"
+                    android:layout_marginStart="15dp"
+                    android:layout_marginBottom="15dp"
+                    android:textStyle="italic"/>
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="New Text"
-                android:id="@+id/tv_comments"
-                android:textAppearance="@android:style/TextAppearance.Medium" />
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center_horizontal"
+                    android:gravity="center_horizontal"
+                    android:padding="7dp">
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:id="@+id/ll_comment_list">
+                    <Button
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/blog_pager_previous"
+                        android:id="@+id/bt_photo_previous"
+                        android:background="@drawable/button_selector"
+                        android:textStyle="bold"
+                        android:textColor="@color/input_button_color"
+                        android:layout_gravity="center_horizontal"
+                        android:visibility="visible"
+                        android:layout_margin="5dp"
+                        tools:ignore="ButtonStyle"/>
 
+                    <Button
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/blog_pager_next"
+                        android:id="@+id/bt_photo_next"
+                        android:background="@drawable/button_selector"
+                        android:textStyle="bold"
+                        android:textColor="@color/input_button_color"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="5dp"
+                        tools:ignore="ButtonStyle"/>
+                </LinearLayout>
             </LinearLayout>
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="2dp"
-                android:background="@color/background_separator"
-                android:layout_margin="6dp" />
-
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:id="@+id/ll_new_comment"
-                android:layout_marginTop="15dp"
-                android:layout_marginLeft="7dp"
-                android:layout_marginRight="7dp"
-                android:layout_marginBottom="7dp">
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/comment_your_comment"
-                    android:textAppearance="@android:style/TextAppearance.Medium" />
+                    android:id="@+id/tv_comments"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold" />
 
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_text"
-                    android:minLines="2"
-                    android:hint="@string/comment_text"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:gravity="top"
-                    android:layout_margin="4dp"
-                    android:inputType="textCapSentences|textMultiLine"/>
-
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_name"
-                    android:layout_marginLeft="20dp"
-                    android:layout_marginRight="20dp"
-                    android:hint="@string/comment_name"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:layout_marginTop="5dp"
-                    android:layout_marginBottom="5dp"
-                    android:inputType="textCapWords"/>
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/ll_comment_list">
+
+                </LinearLayout>
+
+                <ImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0.5dp"
+                    android:background="@color/image_border"
+                    android:layout_margin="10dp"
+                    android:layout_marginBottom="1dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginTop="3dp"
+                    android:alpha="0.5"
+                    android:adjustViewBounds="false"
+                    android:contentDescription="@string/empty"/>
 
                 <LinearLayout
-                    android:orientation="horizontal"
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:gravity="center_horizontal"
-                    android:layout_marginBottom="10dp">
+                    android:id="@+id/ll_new_comment"
+                    android:layout_marginTop="15dp"
+                    android:layout_marginLeft="7dp"
+                    android:layout_marginRight="7dp"
+                    android:layout_marginBottom="7dp">
 
-                    <Button
+                    <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="@string/comment_send"
-                        android:id="@+id/bt_comment_send"
-                        android:layout_gravity="center_horizontal"
-                        android:background="@drawable/button_selector"
-                        android:textColor="@color/input_button_color"
-                        android:textStyle="bold"
-                        android:layout_marginTop="5dp"
-                        android:layout_marginBottom="5dp" />
+                        android:text="@string/comment_your_comment"
+                        android:textAppearance="@android:style/TextAppearance.Medium" />
 
-                    <ProgressBar
-                        android:layout_width="wrap_content"
+                    <EditText
+                        android:layout_width="fill_parent"
                         android:layout_height="wrap_content"
-                        android:id="@+id/pb_comment"
-                        android:layout_gravity="center_horizontal"
-                        android:visibility="gone" />
+                        android:id="@+id/et_comment_text"
+                        android:minLines="2"
+                        android:hint="@string/comment_text"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:gravity="top"
+                        android:layout_margin="4dp"
+                        android:inputType="textCapSentences|textMultiLine"/>
+
+                    <EditText
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/et_comment_name"
+                        android:layout_marginLeft="20dp"
+                        android:layout_marginRight="20dp"
+                        android:hint="@string/comment_name"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:layout_marginTop="5dp"
+                        android:layout_marginBottom="5dp"
+                        android:inputType="textCapWords"/>
+
+                    <LinearLayout
+                        android:orientation="horizontal"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:gravity="center_horizontal"
+                        android:layout_marginBottom="10dp">
+
+                        <Button
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="@string/comment_send"
+                            android:id="@+id/bt_comment_send"
+                            android:layout_gravity="center_horizontal"
+                            android:background="@drawable/button_selector"
+                            android:textColor="@color/input_button_color"
+                            android:textStyle="bold"
+                            android:layout_marginTop="5dp"
+                            android:layout_marginBottom="5dp" />
+
+                        <ProgressBar
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:id="@+id/pb_comment"
+                            android:layout_gravity="center_horizontal"
+                            android:visibility="gone" />
+                    </LinearLayout>
+
                 </LinearLayout>
 
             </LinearLayout>
+
         </LinearLayout>
 
     </LinearLayout>

+ 25 - 14
app/src/main/res/layout/row_album.xml

@@ -13,15 +13,19 @@
         android:layout_height="wrap_content"
         android:layout_weight=".5"
         android:background="@drawable/entry"
-        android:layout_margin="5dp"
-        android:padding="5dp"
-        android:id="@+id/ll_row_album_left">
+        android:padding="7dp"
+        android:id="@+id/ll_row_album_left"
+        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="0dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="0dp"
+        android:layout_marginTop="8dp">
 
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
             android:id="@+id/tv_row_album_hidden_left"
             android:visibility="gone" />
 
@@ -40,6 +44,8 @@
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="@color/entry_title"
+            android:textStyle="bold"
             android:id="@+id/tv_row_album_title_left"
             android:gravity="center_horizontal" />
 
@@ -59,10 +65,10 @@
                 android:layout_gravity="center_vertical" />
 
             <ImageView
-                android:layout_width="15dp"
-                android:layout_height="15dp"
+                android:layout_width="11dp"
+                android:layout_height="11dp"
                 android:src="@drawable/comment"
-                android:contentDescription="@string/app_cdesc"
+                android:contentDescription="@string/empty"
                 android:layout_marginStart="5dp"
                 android:layout_gravity="center_vertical" />
         </LinearLayout>
@@ -75,16 +81,20 @@
         android:layout_height="wrap_content"
         android:layout_weight=".5"
         android:background="@drawable/entry"
-        android:layout_margin="5dp"
-        android:padding="5dp"
+        android:padding="7dp"
         android:id="@+id/ll_row_album_right"
+        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="0dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="0dp"
+        android:layout_marginTop="8dp"
         android:visibility="invisible">
 
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
             android:id="@+id/tv_row_album_hidden_right"
             android:visibility="gone" />
 
@@ -103,7 +113,8 @@
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
+            android:textColor="@color/entry_title"
+            android:textStyle="bold"
             android:id="@+id/tv_row_album_title_right"
             android:gravity="center_horizontal" />
 
@@ -124,10 +135,10 @@
                 android:layout_gravity="center_vertical" />
 
             <ImageView
-                android:layout_width="15dp"
-                android:layout_height="15dp"
+                android:layout_width="11dp"
+                android:layout_height="11dp"
                 android:src="@drawable/comment"
-                android:contentDescription="@string/app_cdesc"
+                android:contentDescription="@string/empty"
                 android:layout_marginStart="5dp"
                 android:layout_gravity="center_vertical" />
         </LinearLayout>