ACFrOgBvDze5hsGlWYu2foKxTySgSfF1y4jjjJI6kL6oyKcL1itlP17NNZ7jiIslB7sU_DCaEc7IsQSSYt7cwthQogHcpHdg6q3ei1DWXgJ4saGhA57MrXxwvNx5nWTItj4tIQrDpGbQ_ympbJnA
ACFrOgBvDze5hsGlWYu2foKxTySgSfF1y4jjjJI6kL6oyKcL1itlP17NNZ7jiIslB7sU_DCaEc7IsQSSYt7cwthQogHcpHdg6q3ei1DWXgJ4saGhA57MrXxwvNx5nWTItj4tIQrDpGbQ_ympbJnA
ACFrOgBvDze5hsGlWYu2foKxTySgSfF1y4jjjJI6kL6oyKcL1itlP17NNZ7jiIslB7sU_DCaEc7IsQSSYt7cwthQogHcpHdg6q3ei1DWXgJ4saGhA57MrXxwvNx5nWTItj4tIQrDpGbQ_ympbJnA
Assignment No: 01
Date of Submission: 05/01/2021
Submitted to
Mr. Md. Aminur Rahman
Assistant Professor, Department of CSE, AUST.
Submitted by
Name: Md. Muhaiminul Kabir
Student ID: 190204063
Question: Write necessary codes for designing the
following.
Solution:
Activity_main.xml :
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginBottom="263dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="160dp"
android:layout_height="160dp"
android:src="@drawable/pnn" />
<ImageView
android:layout_width="160dp"
android:layout_height="160dp"
android:src="@drawable/pnn" />
</LinearLayout>
<TextView
android:id="@+id/one"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Plastic memories"
android:textSize="30dp"
android:gravity="center_horizontal"
android:fontFamily="serif"
android:textColor="#000000"
android:layout_margin="10dp"
android:layout_alignParentBottom="true"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginBottom="80dp"
android:layout_marginLeft="50dp"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="button1"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginBottom="20dp"
android:layout_marginLeft="100dp"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="button4"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginBottom="20dp"
android:layout_marginLeft="250dp"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="button5"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginBottom="80dp"
android:layout_marginLeft="290dp"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="button3"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/one"
android:layout_marginLeft="170dp"
android:layout_marginBottom="80dp"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="button2"
/>
</LinearLayout>
</RelativeLayout>
strings.xml :
<resources>
<string name="app_name">Assignments are cool</string>
</resources>
MainActivity.kt:
package com.example.myapplication
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle