11- Building First Interactive Project بناء أول تطبيق تفاعلى

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • Learn Android Studio 2020 Series
    سلسلة تعليم الاندرويد
    الحلقة 11. بناء أول تطبيق تفاعلى
    فى انتظار ابداعتكم
    eng.amirantar1985@gmail.com
    لمشاهدة الحلقات السابقة
    • 01-Android Studio 2020...
    /**
    IMPORTANT: Make sure you are using the correct package name.
    This example uses the package name:
    package com.example.android.justjava
    If you get an error when copying this code into Android studio, update it to match teh package name found
    in the project's AndroidManifest.xml file.
    **/
    package com.example.android.justjava;
    import androidx.appcompat.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.TextView;
    /**
    This app displays an order form to order coffee.
    */
    public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    }
    /**
    This method is called when the order button is clicked.
    */
    public void submitOrder(View view) {
    display(1);
    }
    /**
    This method displays the given quantity value on the screen.
    */
    private void display(int number) {
    TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);
    quantityTextView.setText("" + number);
    }
    }

КОМЕНТАРІ • 1

  • @hendhosny6705
    @hendhosny6705 3 роки тому

    شكرا ليك جزاك الله كل خير .