Skip to content

Instantly share code, notes, and snippets.

View AhmedMohamedAteya's full-sized avatar
:octocat:
Coding

Ateya AhmedMohamedAteya

:octocat:
Coding
  • Egypt
View GitHub Profile
package com.example.android.justjava;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.TextView;
import java.text.NumberFormat;
/**
/**
* This method displays the given price on the screen.
*/
private void displayPrice(int number) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(NumberFormat.getCurrencyInstance().format(number));
}
@AhmedMohamedAteya
AhmedMohamedAteya / activity_main.xml
Created January 30, 2018 07:35 — forked from anonymous/activity_main.xml
RelativeLayout XML for Udacity quiz question
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:text="I’m in this corner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Guest List"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Text View
android:text="Hapy Birthday"
android:layout_width="150dp"
android:layout_height="150"
android:background="@android:color/darker_groy"
>