Last active
June 4, 2020 23:46
-
-
Save nesendal/014b42dff58aba8ba29a0623eab71b84 to your computer and use it in GitHub Desktop.
ListViewOzellestirme
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
package com.example.deney; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.ArrayAdapter; | |
import android.widget.ListView; | |
public class MainActivity extends AppCompatActivity { | |
String[] mobileArray = {"Android", "IPhone", "WindowsMobile", "Blackberry", | |
"WebOS", "Ubuntu", "Windows7", "Max OS X"}; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ArrayAdapter adapter = new ArrayAdapter<String> | |
(this, | |
R.layout.activity_listview, | |
mobileArray); | |
ListView listView = (ListView) findViewById(R.id.listview); | |
listView.setAdapter(adapter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Teşekkürler