Add swipe to refresh to the View Source activity. https://redmine.stoutner.com/issue...
[PrivacyBrowser.git] / app / src / main / res / layout / view_source_coordinatorlayout.xml
index 71a7667631dba3309cbd14b1c996ee34267dfad6..5d8f191efbf1ab8201df67bc64ae57c316cd869e 100644 (file)
             </FrameLayout>
         </android.support.design.widget.AppBarLayout>
 
-        <ScrollView
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent" >
+        <android.support.v4.widget.SwipeRefreshLayout
+            android:id="@+id/view_source_swiperefreshlayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent">
 
-            <LinearLayout
+            <ScrollView
                 android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:orientation="vertical"
-                android:layout_margin="10dp" >
-
-                <!-- Request headers. -->
-                <TextView
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:text="@string/request_headers"
-                    android:textAlignment="center"
-                    android:textSize="18sp"
-                    android:textColor="@color/blue_600"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:id="@+id/request_headers"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:textIsSelectable="true"
-                    android:layout_marginBottom="8dp" />
-
-                <!-- Response message. -->
-                <TextView
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:text="@string/response_message"
-                    android:textAlignment="center"
-                    android:textSize="18sp"
-                    android:textColor="@color/blue_600"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:id="@+id/response_message"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:textIsSelectable="true"
-                    android:layout_marginBottom="8dp" />
-
-                <!-- Response headers. -->
-                <TextView
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:text="@string/response_headers"
-                    android:textAlignment="center"
-                    android:textSize="18sp"
-                    android:textColor="@color/blue_600"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:id="@+id/response_headers"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:textIsSelectable="true"
-                    android:layout_marginBottom="8dp" />
+                android:layout_width="match_parent" >
 
-                <!-- Response body. -->
-                <TextView
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:text="@string/response_body"
-                    android:textAlignment="center"
-                    android:textSize="18sp"
-                    android:textColor="@color/blue_600"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:id="@+id/response_body"
+                <LinearLayout
                     android:layout_height="wrap_content"
                     android:layout_width="match_parent"
-                    android:textIsSelectable="true" />
-            </LinearLayout>
-        </ScrollView>
+                    android:orientation="vertical"
+                    android:layout_margin="10dp" >
+
+                    <!-- Request headers. -->
+                    <TextView
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/request_headers"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="@color/blue_600"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/request_headers"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response message. -->
+                    <TextView
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/response_message"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="@color/blue_600"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_message"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response headers. -->
+                    <TextView
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/response_headers"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="@color/blue_600"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_headers"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response body. -->
+                    <TextView
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/response_body"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="@color/blue_600"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_body"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true" />
+                </LinearLayout>
+            </ScrollView>
+        </android.support.v4.widget.SwipeRefreshLayout>
     </LinearLayout>
 </android.support.design.widget.CoordinatorLayout>
\ No newline at end of file