-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
157 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,158 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:orientation="vertical"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="@color/color_base" | ||
app:contentInsetEnd="0dp" | ||
app:contentInsetStart="0dp"> | ||
|
||
<ImageView | ||
android:paddingTop="10dp" | ||
android:paddingStart="10dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent" | ||
android:scaleType="fitStart" | ||
android:src="@drawable/ooniprobe_logo" /> | ||
|
||
</androidx.appcompat.widget.Toolbar> | ||
|
||
<io.github.florent37.shapeofview.shapes.ArcView | ||
android:layout_width="match_parent" | ||
android:layout_height="56dp" | ||
android:id="@+id/arc_view" | ||
app:layout_constraintTop_toBottomOf="@id/toolbar" | ||
app:shape_arc_height="-16dp" | ||
app:shape_arc_position="bottom"> | ||
|
||
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/color_base"/> | ||
|
||
</io.github.florent37.shapeofview.shapes.ArcView> | ||
|
||
<Button | ||
android:id="@+id/run_all" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" | ||
android:layout_width="wrap_content" | ||
android:layout_height="56dp" | ||
android:layout_marginTop="24dp" | ||
android:backgroundTint="@android:color/white" | ||
android:stateListAnimator="@null" | ||
android:elevation="5dp" | ||
android:translationZ="5dp" | ||
app:layout_constraintTop_toTopOf="@id/arc_view" | ||
app:layout_constraintEnd_toEndOf="@id/arc_view" | ||
app:layout_constraintStart_toStartOf="@id/arc_view" | ||
app:layout_constraintBottom_toBottomOf="@id/arc_view" | ||
android:text="@string/Dashboard_Card_Run" | ||
android:textAllCaps="false" | ||
android:textColor="?attr/colorPrimary" | ||
android:transitionName="@string/transitionNameRun" | ||
app:cornerRadius="18dp" | ||
app:rippleColor="@color/ripple_material_light" /> | ||
|
||
<TextView | ||
android:id="@+id/last_tested" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/Dashboard_Overview_LatestTest" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/run_all" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" | ||
android:textColor="@color/color_black"/> | ||
|
||
<RelativeLayout | ||
android:id="@+id/vpnLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/last_tested"> | ||
|
||
<TextView | ||
android:id="@+id/vpn" | ||
app:drawableStartCompat="@android:drawable/ic_dialog_alert" | ||
android:drawablePadding="8dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerInParent="true" | ||
android:padding="8dp" | ||
android:background="@drawable/laoyout_rounded_corners" | ||
android:gravity="center" | ||
android:text="@string/Modal_DisableVPN_Title" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" | ||
android:textColor="@color/color_white" /> | ||
</RelativeLayout> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/recycler" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:paddingStart="8dp" | ||
android:paddingEnd="8dp" | ||
android:paddingTop="5dp" | ||
android:paddingBottom="16dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/vpnLayout" | ||
tools:listitem="@layout/item_testsuite" | ||
android:clipToPadding="false" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
tools:context=".fragment.DashboardFragment"> | ||
|
||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||
android:id="@+id/swipe_refresh" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@color/color_white" | ||
android:paddingTop="16dp" | ||
app:contentInsetEnd="0dp" | ||
app:contentInsetStart="0dp" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginStart="15dp" | ||
android:layout_marginLeft="15dp" | ||
android:scaleType="centerInside" | ||
android:src="@drawable/ooniprobe_logo" | ||
app:tint="@color/color_gray6" /> | ||
|
||
</androidx.appcompat.widget.Toolbar> | ||
|
||
<io.github.florent37.shapeofview.shapes.ArcView | ||
android:id="@+id/arc_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="56dp" | ||
app:layout_constraintTop_toBottomOf="@id/toolbar" | ||
app:shape_arc_height="-16dp" | ||
app:shape_arc_position="bottom"> | ||
|
||
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/color_white" /> | ||
|
||
</io.github.florent37.shapeofview.shapes.ArcView> | ||
|
||
<LinearLayout | ||
android:id="@+id/idle_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="24dp" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:paddingStart="14dp" | ||
android:paddingEnd="14dp" | ||
app:layout_constraintEnd_toEndOf="@id/arc_view" | ||
app:layout_constraintStart_toStartOf="@id/arc_view" | ||
app:layout_constraintTop_toTopOf="@id/arc_view"> | ||
|
||
<Button | ||
android:id="@+id/run_all" | ||
android:layout_width="wrap_content" | ||
android:layout_height="56dp" | ||
android:drawableEnd="@drawable/outline_timer" | ||
android:drawableTint="@android:color/white" | ||
android:elevation="5dp" | ||
android:stateListAnimator="@null" | ||
android:text="@string/Dashboard_Card_Run" | ||
android:textAllCaps="false" | ||
android:textAppearance="?attr/textAppearanceHeadline6" | ||
android:transitionName="@string/transitionNameRun" | ||
android:translationZ="5dp" | ||
android:visibility="gone" | ||
app:cornerRadius="24dp" | ||
app:layout_constraintBottom_toBottomOf="@id/arc_view" | ||
app:rippleColor="@color/ripple_material_light" /> | ||
|
||
<TextView | ||
android:id="@+id/last_tested" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/Dashboard_Overview_LatestTest" | ||
android:textAppearance="?attr/textAppearanceCaption" | ||
android:textColor="@color/color_black" | ||
android:visibility="gone" /> | ||
|
||
<fragment | ||
android:id="@+id/progress_fragment" | ||
android:name="org.openobservatory.ooniprobe.fragment.ProgressFragment" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="18dp" /> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:id="@+id/vpnLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:gravity="center_horizontal" | ||
android:layout_margin="8dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/idle_layout"> | ||
|
||
<TextView | ||
android:id="@+id/vpn" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerInParent="true" | ||
android:background="@drawable/laoyout_rounded_corners" | ||
android:drawablePadding="8dp" | ||
android:gravity="center" | ||
android:padding="8dp" | ||
android:text="@string/Modal_DisableVPN_Title" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" | ||
android:textColor="@color/color_white" | ||
app:drawableStartCompat="@android:drawable/ic_dialog_alert" /> | ||
|
||
<TextView | ||
android:id="@+id/tests_completed" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerInParent="true" | ||
android:background="@drawable/laoyout_rounded_corners" | ||
android:backgroundTint="@color/color_green6" | ||
android:drawablePadding="8dp" | ||
android:gravity="center" | ||
android:visibility="gone" | ||
android:padding="8dp" | ||
android:text="Run finished. Tap to view results." | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" | ||
android:textColor="@color/color_white"/> | ||
</LinearLayout> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/recycler" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:clipToPadding="false" | ||
android:paddingStart="14dp" | ||
android:paddingTop="5dp" | ||
android:paddingEnd="14dp" | ||
android:paddingBottom="16dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/vpnLayout" | ||
tools:listitem="@layout/item_testsuite" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | ||
</layout> |