Created
December 26, 2016 17:15
-
-
Save uruskan/2a456ec6b2e96a4df10166bcf2d51135 to your computer and use it in GitHub Desktop.
Java Buton İle TextView Değiştirme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Bu amınakodumun şeyi için 2 gündür uğraşıyorum windowsda hiçbir update yapılmamışken (studio update) çalışdı bakalım linuxdada çalışacakmı. | |
26.12.2016 | |
Yusuf Umut Piynar | |
alkauruskan.wordpress.com | |
*/ | |
package com.example.uruskan.myapplication; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import android.widget.Button; | |
import android.view.View; //bunu amınakodumun studiosu otomatik eklemiyodu | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
final TextView tv = (TextView) findViewById(R.id.textView); | |
Button button = (Button) findViewById(R.id.button); | |
button.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
tv.setText("Deneme"); | |
//onclick kodunu buraya yazıyoz işde | |
} | |
// onClick... | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment