01-05-2017, 08:35 PM
So I gave Android a try. I took a course on Udacity, Android Basics: User Interface (Katherine is sooo Kawaiii <3)
At the end, there was a simple project. I needed to make a single screen app, just layout the components with Relative or Linear Layout and use Images and text views to design the elements. We have to create a sort of Business/Organization Info View.
Full Description: https://classroom.udacity.com/courses/ud...124e52a2d#
I made the following (Not the worst looking screen I suppose):
It has a little bloated look I suppose.
XML Code:
Let me know if you can improve the design a little. Suggestions are very much welcome.
At the end, there was a simple project. I needed to make a single screen app, just layout the components with Relative or Linear Layout and use Images and text views to design the elements. We have to create a sort of Business/Organization Info View.
Full Description: https://classroom.udacity.com/courses/ud...124e52a2d#
I made the following (Not the worst looking screen I suppose):
It has a little bloated look I suppose.
XML Code:
Code:
<?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:id="@+id/activity_main"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.malc0de.food4all.MainActivity">
<LinearLayout
android:background="#7d97ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<ImageView
android:id="@+id/logoicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logoicon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="24sp"
android:textColor="#ffffff"
android:fontFamily="sans-serif-condensed" />
</LinearLayout>
<ImageView
android:id="@+id/banner_image"
android:src="@drawable/pov2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:contentDescription="Banner Image" />
<TextView
android:id="@+id/contacts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/contact_det"
android:textSize="24sp"
android:textStyle="bold"
android:layout_marginTop="10dp"
android:layout_marginLeft="40dp"
android:fontFamily="casual" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:src="@drawable/phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:contentDescription="Phone Icon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/phone_no"
android:textSize="24sp"
android:paddingLeft="16dp"
android:textStyle="bold"
android:gravity="center_vertical" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="4dp">
<ImageView
android:src="@drawable/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:contentDescription="Location Icon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/location"
android:textSize="24sp"
android:paddingLeft="16dp"
android:textStyle="bold"
android:gravity="center_vertical"
android:id="@+id/textView" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/desc_det"
android:textSize="24sp"
android:textStyle="bold"
android:layout_marginTop="10dp"
android:layout_marginLeft="40dp"
android:fontFamily="casual" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="10dp"
android:text="@string/desc"
android:textSize="20sp" />
</LinearLayout>
Let me know if you can improve the design a little. Suggestions are very much welcome.