Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android

 Android

Karabük Üniversitesi Android Sunumu - 27/03/2013

Burak Aydın

March 27, 2013
Tweet

More Decks by Burak Aydın

Other Decks in Programming

Transcript

  1. 2/23 Ajanda •GDG Ankara •Android •Android Uygulama Yapısı •Android Uygulama

    Bileşenleri •Araçlar – Nereden başlamalı? •Hello World!
  2. 10/23 Uygulama Yapısı ├── assets ├── bin ├── libs ├──

    res │ ├── drawable-hdpi │ ├── drawable-ldpi │ ├── drawable-mdpi │ ├── drawable-xhdpi │ ├── layout │ ├── menu │ └── values └── src └── com └── example └── deneme
  3. 11/23 Manifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.gdgankara.ornek" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8"

    android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".LoginActivity" android:label="@string/title_activity_login" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  4. 13/23 Intent & Intent Filter Niyet ettim... startActivity(new Intent(getApplicationContext(), Activity2.class));

    <activity android:name=".OrnekActivity"> <intent-filter> <action android:name="android.intent.action.VIEW"/> </intent-filter> </activity>
  5. 14/23 Service • Arka planda çalışır. • Multi-tasking özelliğini kullanır.

    <manifest> <application> <service android:name=".OrnekService" /> </application> </manifest>
  6. 15/23 Content Provider • İçerik paylaşımı • Kişi listesine erişim

    <manifest> <application> <provider android:name=".contentprovider.MyTodoContentProvider" android:authorities="org.ankara.android.todos.contentprovider"> </provider> </application> </manifest>
  7. 16/23 Broadcast Receiver • Telefon açıldığında • Sms geldiğinde •

    Pil azaldığında... <manifest> <application> <receiver android:name="OrnekReceiver" > <intent-filter> <action android:name="android.intent.action.VIEW" /> </intent-filter> </receiver> </application> </manifest>
  8. 18/23 Layouts & Views •GridView •ListView •ImageView •WebView •TextView •Button

    •Checkbox •ProgressBar •RadioButton •Dialogs • RelativeLayout • LinearLayout • GridLayout • TableLayout • FrameLayout
  9. 19/23 R.java txtKullaniciAdi = (TextView) findViewById(R.id.txtKullaniciAdi); txtSifre = (TextView) findViewById(R.id.txtSifre);

    OrnekActivity.java <EditText android:id="@+id/edKullaniciAdi" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"> </EditText> <EditText android:id="@+id/edSifre" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"/> activity_ornek.xml
  10. 20/23 Nereden başlıyoruz? Eclipse + Android Development Tool JDK 7

    http://developer.android.com/sdk http://developer.android.com/training