Skip to content

Instantly share code, notes, and snippets.

@ZahraaElhaj
ZahraaElhaj / StoreContract.java
Created Mar 21, 2018 — forked from udacityandroid/StoreContract.java
Example contract class for a table which contains data about the store's headphones stock
View StoreContract.java
public final class StoreContract {
public static abstract class HeadphoneEntry implements BaseColumns {
public static final String TABLE_NAME = "headphones";
public static final String COLUMN_NAME = "name";
public static final String COLUMN_PRICE = "price";
public static final String COLUMN_STYLE = "style";
public static final String COLUMN_IN_STOCK = "in_stock";
public static final String COLUMN_DESCRIPTION = "description";
View MainActivity.java
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;
/**
@ZahraaElhaj
ZahraaElhaj / ImageView.java
Created Mar 7, 2018 — forked from udacityandroid/ImageView.java
Android for Beginners : Simplified ImageView class
View ImageView.java
/**
* Displays an image, such as an icon.
*/
public class ImageView extends View {
// Resource ID for the source image that should be displayed in the ImageView.
private int mImageId;
// Context of the app
private Context mContext;
@ZahraaElhaj
ZahraaElhaj / TextView.java
Created Mar 7, 2018 — forked from udacityandroid/TextView.java
Android for Beginners : Simplified TextView class
View TextView.java
/**
* Displays text to the user.
*/
public class TextView extends View {
// String value
private String mText;
// Text color of the text
private int mTextColor;
You can’t perform that action at this time.