Skip to content

Instantly share code, notes, and snippets.

@abdulazizahwan
Created March 5, 2020 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdulazizahwan/6221ac9f0188348b21dc37568b7bff23 to your computer and use it in GitHub Desktop.
Save abdulazizahwan/6221ac9f0188348b21dc37568b7bff23 to your computer and use it in GitHub Desktop.
activity_main for tutorial https://youtu.be/BV3ijYdVOfI
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottieImage"
android:layout_width="match_parent"
android:layout_height="460dp"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_marginTop="-64dp"
app:lottie_autoPlay="true"
app:lottie_fileName="events.json"
app:lottie_loop="true" />
<cn.iwgang.countdownview.CountdownView
android:id="@+id/countdownView"
style="@style/CustomFont"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lottieImage"
android:layout_centerInParent="true"
android:layout_marginTop="-64dp"
app:isHideTimeBackground="false"
app:isShowDay="true"
app:isShowHour="true"
app:isShowMillisecond="true"
app:isShowMinute="true"
app:isShowSecond="true"
app:isTimeTextBold="true"
app:suffixDay="d"
app:suffixGravity="bottom"
app:suffixHour="h"
app:suffixMillisecond="ms"
app:suffixMinute="m"
app:suffixSecond="s"
app:suffixTextColor="#000000"
app:suffixTextSize="12sp"
app:timeBgColor="@color/colorAccent"
app:timeBgRadius="4dp"
app:timeTextColor="#FFFFFF"
app:timeTextSize="32sp" />
<TextView
android:id="@+id/textViewTop"
style="@style/CustomFont"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/countdownView"
android:layout_centerInParent="true"
android:layout_marginTop="32dp"
android:fontFamily="@font/poppins"
android:text="Countdown to New Year"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewContent"
style="@style/CustomFont"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textViewTop"
android:layout_centerInParent="true"
android:textSize="28sp"
android:textStyle="bold"
tools:text="DatePicker" />
<Button
android:id="@+id/btnDatePicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="32dp"
android:background="@drawable/rounded"
android:text="Date Picker"
android:textColor="#fff" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment