Skip to content

Instantly share code, notes, and snippets.

View mezdour's full-sized avatar

dz-programmation mezdour

View GitHub Profile
@mezdour
mezdour / xml
Created January 27, 2018 17:03
طريقة اضافة زر عند الضغط عليه يظهر عبارة
xml:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:layout_margin="16dp"
android:id="@+id/messageText"
/>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:background="#B388FF"
android:orientation="vertical"
tools:context="com.example.android.cookies.Cookies">
package com.example.android.cookies;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class Cookies extends AppCompatActivity {
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context="com.example.android.justjava.MainActivity">
<TextView
package com.example.android.justjava;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import java.text.NumberFormat;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
int numberOfCoffees = 0;