Skip to content

Instantly share code, notes, and snippets.

<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" />
@redtripleAAA
redtripleAAA / gist:9438e0f8db8bbb8ee23e094bb6f371aa
Last active January 27, 2018 02:07
android-visualizer - sample -
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Happy Birthday!, Anas مرحبا يا أهلا وسهلا ... كل المراحب يا باشا ... أجمل تحية"
android:background="@android:color/darker_gray"
android:textStyle="bold"
android:layout_width="wrap_content"
@redtripleAAA
redtripleAAA / gist:02eaf105694d38114a13e4bd9e6a132b
Created January 27, 2018 02:08
Linear Layout - Layout Weight
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/ocean"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@redtripleAAA
redtripleAAA / activity_main.xml
Created January 27, 2018 02:45 — 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"
@redtripleAAA
redtripleAAA / gist:a36e9779e608ae6dd5430d07ff7e8f54
Created January 27, 2018 06:15
Quiz 9 - Lesson 3 - Relative to other views - Udacity
<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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
@redtripleAAA
redtripleAAA / gist:dff5f7376f0ee9b3e70e9bab20c72428
Created January 27, 2018 06:24
Quiz 10 - Udacity - List Item with RelativeLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/ocean_image_view"
android:layout_width="56dp"
android:layout_height="56dp"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="16dp"
android:orientation="vertical">
@redtripleAAA
redtripleAAA / Code snippet from MainActivity.java
Created February 8, 2018 05:50 — forked from udacityandroid/Code snippet from MainActivity.java
Android for Beginners : Negative Number of Cups of Coffee Extra Challenge Solution
/**
* This method is called when the plus button is clicked.
*/
public void increment(View view) {
if (quantity == 100) {
// Show an error message as a toast
Toast.makeText(this, "You cannot have more than 100 coffees", Toast.LENGTH_SHORT).show();
// Exit this method early because there's nothing left to do
return;
}
@redtripleAAA
redtripleAAA / docker_wordpress.md
Created May 27, 2020 07:39 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@redtripleAAA
redtripleAAA / gist:a6a5733e1b8322722572f782529c8c66
Created April 8, 2021 01:51
Docker Compose - WordPress - Synology NAS
version: '2.1'
services:
wordpress:
user: root
image: wordpress
restart: unless-stopped
ports:
- 6980:80