Skip to content

Instantly share code, notes, and snippets.

View almansoub2018's full-sized avatar

MOEEN ALMANSOB almansoub2018

  • MOEEN ALMANSOUB
View GitHub Profile
@almansoub2018
almansoub2018 / MainActivity.java
Created October 4, 2018 15:57 — forked from udacityandroid/MainActivity.java
Android for Beginners : Menu Solution Code
package com.example.android.menu;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
/**
* This method displays the given text on the screen.
*/
private void displayMessage(String message) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(message);
}
@almansoub2018
almansoub2018 / activity_main.xml
Created August 17, 2018 15:13 — 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"
@almansoub2018
almansoub2018 / AndroidManifest.xml
Created August 7, 2018 16:35 — forked from romannurik/AndroidManifest.xml
Android example of how to programmatically instantiate a View with a custom style.
<manifest ...>
...
<!-- Make sure your app (or individual activity) uses the
theme with the custom attribute defined. -->
<application android:theme="@style/AppTheme" ...>
...
</application>
</manifest>
<Text View
android:text="Hapy Birthday"
android:layout_width="150dp"
android:layout_height="150"
android:background="@android:color/darker_groy"
>