Posts

Showing posts from June, 2017

Default Constraint Layout Android SDK

<? xml version= "1.0" encoding= "utf-8" ?> < android.support.constraint.ConstraintLayout 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= "com.example.android.happybirthday.MainActivity" > < TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Hello World!" app :layout_constraintBottom_toBottomOf= "parent" app :layout_constraintLeft_toLeftOf= "parent" app :layout_constraintRight_toRightOf= "parent" app :layout_constraintTop_toTopOf= "parent" /> </ android.support.constraint.Constra...

Discussion about Constraint Layout

Before starting on the next video, we want to bring to your attention a new feature in new Android Studio - Constraint Layout - that may require you to make some code modifications to the steps you see in the following videos. Keeping up with the changes Google is constantly improving the Android platform and adding new features. This is great for you as a developer, but it makes learning harder sometimes. Recently Google released ConstraintLayout ; a tool that makes it super fast to create responsive UIs with many different types of components. ConstraintLayout is a great tool to have on the sleeve, but for this class, we will use RelativeLayout , LinearLayout simpler. All of this matters to you because the new project templates in Android Studio now use ConstraintLayout as default, which makes the code you see on your computer a bit different from what is on the screen. Current Layout File In the new versions of Android Studio, after choosing the Empty Activity ...

Coffee Break Challenge Udacity Android For Beginers finding error in code

<LinearLayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">     <TextView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="To Ben"         android:textSize="24sp"/>     <TextView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="Happy Birthday"         android:textSize="34sp"/>     <ImageView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_weight= "1"          android:src="@drawable/ocean"/> ...

Installation Guide: Windows

Image
Installation Guide: Windows ForMac installation instructions, go to the next page. Install Android Studio Navigate here, to the Android developers site to install Android Studio. This page will automatically detect your operating system. Accept the terms and conditions to start the download. Double-click the downloaded file and follow all the prompts. Open the downloaded file, and follow the Android Studio Setup Wizard. Accept the defaults configuration for all steps. When you reach this screen, make sure that all components are selected. Setup Wizard After finishing the install, the Setup Wizard will download and install some additional components. Be patient, this might take some time depending on your internet speed. Install Finished! When you are finished, you will see this window:

Padding On The Sides And Want Margin At All The Sides Of The Device

<LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent"                     android:orientation="vertical">     <ImageView         android:src="@drawable/ocean"         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:scaleType="centerCrop" />     <TextView         android:text="You're invited!"         android:paddingTop="16dp"         android:paddingLeft="16dp"         android:paddingBottom="8dp"         android:layout_width="match_parent"         android:layou...

Linear Layout To Relative Layout To Form List Using A Image View And Text View

<RelativeLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">     <ImageView         android:id="@+id/beach_Image_View"         android:layout_width="56dp"         android:layout_height="56dp"         android:scaleType="centerCrop"         android:src="@drawable/ocean" />     <TextView         android:id="@+id/pebble_text_View"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_toRightOf="@id/beach_Image_View"         android:text="Pebble Beach"         android:textAppearance="?android:textAppearanceMedium" />     ...

Relative Layout Of Text View With Respect To Other text Views

<RelativeLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">     <TextView         android:id="@+id/lyla_text_view"         android:background="#009688"         android:textColor="@android:color/white"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentBottom="true"         android:layout_alignParentLeft="true"         android:textSize="24sp"         android:text="Lyla" />     <TextView         android:id="@+id/me_text_view"         android:background="#009688"         android:textColor="@android:co...

Relative Layout, Parent View, Child View.

<RelativeLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">     <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentLeft="true"         android:layout_alignParentTop="true"         android:background="#009688"         android:textSize="34sp"         android:textColor="@android:color/white"         android:textAppearance="?android:textAppearanceLarge"         android:text="Happy" />     <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"       ...

Linear Layout , Layout Weight, Type Of View

<LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="@android:color/darker_gray">     <ImageView         android:src="@drawable/ocean"         android:layout_width="wrap_content"         android:layout_height="0dp"         android:layout_weight="1"         android:scaleType="centerCrop" />     <TextView         android:text="VIP List"         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="#4CAF50"         android:textSize...