NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Ushtrimi 3 Teza 3

a) Applikacioni perbehet nga Titulli : string Name Mathematics Topics and Tuto...
Permban 7 butona te cilat jane implemntuar dhe me text dhe me nje imazh grafik
android:drawableRight="@drawable/imazhi"
textview, textboxe, edittext te screenshot 2 dhe butoni i cili shpaq me pas ne textview rezultatet
b)Krijojme buton dhe me pas list view dhe opsioni 1 qe te con te aktiviteti 2
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="sendMessage"
android:text="@string/button" />
Te aktiviteti 1 shtojme me pas kete metode
public void sendMessage(View view)
{
Intent intent = new Intent(FromActivity.this, ToActivity.class);
startActivity(intent);
}
emertojme me pas aktivitetin ne manifest.xml

<activity
android:name=".ToActivity"
android:label="@string/math_app">
</activity>
/////ose menyra e dyte me thjeshte:\\\
Button btn = (Button) findViewById(R.id.button1);

btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, MainActivity2.class);//te dyja aktivitetet te deklaruara
MainActivity.this.startActivity(myIntent);
}
});
c) supozohet se eshte nje liste me menu tab, pasi te klikojm tek butoni planet duam qe
te shfaqet nje dialog box.Kete e bejme duke thirrur nje showDialogBox
Button PlaneGeometry = (Button) findViewById(R.id.more);
more.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent myIntent = new Intent(view.getContext(), agones.class);
startActivityForResult(myIntent, 0);
AlertDialog alertDialog = new AlertDialog.Builder(<Activity2>this).create();
alertDialog.setTitle("emri qe do ndryshohet");
alertDialog.setMessage("mesazhi qe do shfaqim");
alertDialog.setButton("Continue..", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
alertDialog.show();
}
});
d)<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:gravity="center_horizontal"
        android:text="Vendosni emrin">
    </TextView>
We will enter name and surname into EditText and Submit button will invoke other screen and pass it this data. 

public class MainActivity extends Activity implements OnClickListener {
  EditText Statistics;
  EditText Propability;
  Button btnSubmit;  
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
         
        etFName = (EditText) findViewById(R.id.Statistics);
        etLName = (EditText) findViewById(R.id.Propability);    
        btnSubmit = (Button) findViewById(R.id.btnSubmit);
        btnSubmit.setOnClickListener(this);      
    }
  @Override
  public void onClick(View v) {
    Intent intent = new Intent(this, ViewActivity.class);
    intent.putExtra("Statistics", Statistics.getText().toString());
    intent.putExtra("Propability", Propability.getText().toString());
    startActivity(intent);
  }
Statistics.setOnFocusChangeListener(new View.OnFocusChangeListener(){
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus == false && Statistics.getText().toString() != null
&& Statistics.getText().toString().contains(" ")){
Toast.makeText(getActivity(), "Ju zgjodhet:", Toast.LENGTH_LONG).show();
}
}
};
}
e)reset.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
if (v==reset) {
startActivity(new Intent(Activity2.this, Activity2.class));
}
}
}); ose menyra tjeter: btn.setOnClickListener(new OnClickListener(){
@public void onClick(View view)
{
MinimumRange.setText("");
MaximumRange.setText("");
}
});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.