Skip to content

Commit

Permalink
Country flags
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfcss committed Nov 21, 2023
1 parent 9efb404 commit 6756b62
Show file tree
Hide file tree
Showing 11 changed files with 693 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/contour.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
<stroke
android:width="2dp"
android:color="#000000" />
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
</shape>
49 changes: 49 additions & 0 deletions app/src/main/res/layout/austria.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Austria"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/country_flag"
app:layout_constraintEnd_toEndOf="@+id/country_flag"
app:layout_constraintStart_toStartOf="@+id/country_flag" />

<LinearLayout
android:id="@+id/country_flag"
android:layout_width="300dp"
android:layout_height="200dp"
android:background="@drawable/contour"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#C8102E" />

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fff" />

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#C8102E" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
50 changes: 50 additions & 0 deletions app/src/main/res/layout/colombia.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Austria"
android:textStyle="bold"
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="@+id/country_flag"
app:layout_constraintEnd_toEndOf="@+id/country_flag"
app:layout_constraintStart_toStartOf="@+id/country_flag" />

<LinearLayout
android:id="@+id/country_flag"
android:layout_width="300dp"
android:layout_height="200dp"
android:orientation="vertical"
android:background="@drawable/contour"
android:weightSum="4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:background="#FCD116" />

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#003893" />

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#CE1126" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
93 changes: 93 additions & 0 deletions app/src/main/res/layout/denmark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?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">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Denmark"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/country_flag"
app:layout_constraintEnd_toEndOf="@+id/country_flag"
app:layout_constraintStart_toStartOf="@+id/country_flag" />

<LinearLayout
android:id="@+id/country_flag"
android:layout_width="300dp"
android:layout_height="200dp"
android:orientation="vertical"
android:background="@drawable/contour"
android:weightSum="5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.1"
android:background="#C60C30"
android:orientation="horizontal"
android:weightSum="10">

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="#C60C30" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#FFFFFF" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:background="#C60C30" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:background="#FFFFFF" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.1"
android:background="#C60C30"
android:orientation="horizontal"
android:weightSum="10">

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="#C60C30" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#FFFFFF" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:background="#C60C30" />
</LinearLayout>


</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
50 changes: 50 additions & 0 deletions app/src/main/res/layout/denmark_constraint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:gravity="center"
android:orientation="vertical">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Denmark"
android:textSize="30sp"
android:textStyle="bold" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="300dp"
android:layout_height="200dp"
android:background="#C60C30">

<View
android:id="@+id/view2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="80dp"
android:layout_marginBottom="80dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<View
android:id="@+id/view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="80dp"
android:layout_marginEnd="180dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>


</LinearLayout>
49 changes: 49 additions & 0 deletions app/src/main/res/layout/italy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Italy"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/country_flag"
app:layout_constraintEnd_toEndOf="@+id/country_flag"
app:layout_constraintStart_toStartOf="@+id/country_flag" />

<LinearLayout
android:id="@+id/country_flag"
android:layout_width="300dp"
android:layout_height="200dp"
android:background="@drawable/contour"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#008C45" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#F4F5F0" />

<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#CD212A" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
60 changes: 60 additions & 0 deletions app/src/main/res/layout/madagascar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?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">

<TextView
android:id="@+id/county_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="Madagascar"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/country_flag"
app:layout_constraintEnd_toEndOf="@+id/country_flag"
app:layout_constraintStart_toStartOf="@+id/country_flag" />

<LinearLayout
android:id="@+id/country_flag"
android:layout_width="300dp"
android:layout_height="200dp"
android:orientation="horizontal"
android:weightSum="3"
android:background="@drawable/contour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#FFFFFF" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical"
android:background="#F9423A" >

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#F9423A" />

<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#00843D" />

</LinearLayout>


</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Loading

0 comments on commit 6756b62

Please sign in to comment.