Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created November 9, 2018 04:07
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 codingwithsara/a3741213fdbee0a62722faef1255be58 to your computer and use it in GitHub Desktop.
Save codingwithsara/a3741213fdbee0a62722faef1255be58 to your computer and use it in GitHub Desktop.
Java (Android Studio) Tutorial – Calendar, SimpleDateFormat –
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="practice.myapplication.main"
android:background="#3fb399"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/yLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2016"
android:textSize="24sp"
android:textColor="#ffffff"
android:layout_marginLeft="100dp"
android:layout_marginTop="-40dp"/>
<TextView
android:id="@+id/mLabel"
android:layout_width="220dp"
android:layout_height="50dp"
android:text="July"
android:textSize="24sp"
android:textColor="#ffffff"
android:background="#206757"
android:gravity="center"
android:layout_marginTop="40dp"/>
<TextView
android:id="@+id/dLabel"
android:layout_width="220dp"
android:layout_height="200dp"
android:text="3"
android:textSize="56sp"
android:textColor="#206757"
android:background="#ffffff"
android:gravity="center"/>
<TextView
android:id="@+id/eLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sun"
android:textSize="18sp"
android:textColor="#206757"
android:layout_marginTop="-40dp"
android:layout_marginLeft="80dp"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment