Skip to content

Commit

Permalink
GitBook: [master] 32 pages and 19 assets modified
Browse files Browse the repository at this point in the history
  • Loading branch information
yemreak authored and gitbook-bot committed Nov 10, 2019
1 parent dffa1b0 commit 561c8d3
Show file tree
Hide file tree
Showing 40 changed files with 539 additions and 445 deletions.
Binary file modified .gitbook/assets/image (10).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (11).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (12).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (13).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (14).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (15).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (16).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (17).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (18).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (19).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (20).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (21).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (22).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (23).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (24).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/image (25).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/image (26).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/image (27).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (9).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -45,7 +45,7 @@ Tam olarak hangi alanların değiştiğini merak ediyorsan, alttaki linkten GitH

## 🌍 Tüm [YEmreAk ](https://wiki.yemreak.com)İçerikleri

![YEmreAk tüm içerikleri \(her sütun bir web sitesidir\)](.gitbook/assets/image%20%2819%29.png)
![YEmreAk tüm içerikleri \(her sütun bir web sitesidir\)](.gitbook/assets/image%20%2821%29.png)

## 💖 Destek ve İletişim

Expand Down
36 changes: 16 additions & 20 deletions SUMMARY.md
Expand Up @@ -3,33 +3,29 @@
* [📱 YAndroid](README.md)
* [💖 Katkıda Bulunma Rehberi](https://wiki.yemreak.com/contributing)
* [🌟 Faydalı Kaynaklar](https://learn.yemreak.com/icerikler/android)
* [🧱 Temel Kavramlar](temel-kavramlar/README.md)
* [💫 Activity Yaşam Döngüsü](temel-kavramlar/activity-lifecycle-and-state.md)
* [🏹 Implicit intents](temel-kavramlar/implicit-intents.md)
* [⏩ Activity ve Intent'ler](temel-kavramlar/activity-ve-intentler.md)
* [🧐 Component İsimleri](temel-kavramlar/component-isimleri.md)
* [💾 Veri Saklama Yöntemleri](veri-saklama-yoentemleri.md)
* [🎪 Android'de Animasyonlar](androidde-animasyonlar.md)
* [🌄 Arkaplan'da Çalışma](arkaplanda-calisma/README.md)
* [💫 AsyncTask ve AsyncTaskLoader](arkaplanda-calisma/asynctask-ve-asynctaskloader.md)
* [✨ Faydalı Bilgiler](faydali-bilgiler/README.md)
* [⭐ Activity Örnekleri](faydali-bilgiler/activity-notlari.md)
* [✍ Kişisel Notlarım](faydali-bilgiler/kisisel-notlarim.md)
* [📲 Telefonu Bilgisayara Bağlama](faydali-bilgiler/telefonu-bilgisayara-baglama.md)
* [👜 Google Play Store](faydali-bilgiler/google-play-store.md)
* [🐛 Hata Notları](faydali-bilgiler/hata-notlari.md)
* [🥴 Karışık Notlar](faydali-bilgiler/karisik-notlar.md)

## Programlama Notları <a id="programlama-notlari-1"></a>

* [🔰 Giriş](programlama-notlari-1/giris.md)
* [👶 İlk Etkileşimli UI](programlama-notlari-1/ilk-etkilesimli-ui.md)
* [🔤 TextView](programlama-notlari-1/textview.md)
* [⏬ Scrolling views](programlama-notlari-1/scrolling-views.md)
* [📜 XML Örneği](programlama-notlari-1/xml-oernegi.md)
* [⏩ Activity ve Intent'ler](programlama-notlari-1/activity-ve-intentler.md)
* [💫 Activity lifecycle and state](programlama-notlari-1/activity-lifecycle-and-state.md)
* [🏹 Implicit intents](programlama-notlari-1/implicit-intents.md)
* [🚧 AsyncTask ve AsyncTaskLoader](programlama-notlari-1/asynctask-ve-asynctaskloader.md)
* [🚧 Proje İşlemleri](faydali-bilgiler/proje-islemleri.md)
* [🔗 Karışık Bağlantılar](faydali-bilgiler/karisik-notlar.md)
* [🥴 Düzensiz Notlar](duezensiz-notlar/README.md)
* [📜 XML Örneği](duezensiz-notlar/xml-oernegi.md)
* [⏬ Scrolling views](duezensiz-notlar/scrolling-views.md)
* [🔤 TextView](duezensiz-notlar/textview.md)
* [👶 İlk Etkileşimli UI](duezensiz-notlar/ilk-etkilesimli-ui.md)
* [🔰 Giriş](duezensiz-notlar/giris.md)

## Eski Notlarım <a id="programlama-notlari"></a>

* [🧐 Component İsimleri](programlama-notlari/component-isimleri.md)
* [🚧 Proje İşlemleri](programlama-notlari/proje-islemleri.md)
* [📃 Activity Notları](programlama-notlari/activity-notlari.md)
* [💾 Veri Saklama Yöntemleri](programlama-notlari/veri-saklama-yoentemleri.md)
* [⏩ Kaydırmalı Uygulama \(ViewPager ve PageAdapter\)](programlama-notlari/kaydirmali-uygulama-viewpager-ve-pageadapter.md)
* [🎪 Android'de Animasyonlar](programlama-notlari/androidde-animasyonlar.md)

Expand Up @@ -2,10 +2,17 @@

## ⏫ Aşağıdan Gelme Animasyonu

![](../.gitbook/assets/image%20%2817%29.png)
* Proje dizinine `anim` adlı klasör oluşturup içinde bir `resource file'`a bu kodları yazıyoruz.
* `Main`'e alttakiler eklenmeli:
* `btn_start` = Get Started adlı view'ın ID'si
* `frombutton` = üstteki kodların yazıldığı dosyanın adı

Proje dizinine `anim` adlı klasör oluşturup içinde bir `resource file'`a bu kodları yazıyoruz.
{% tabs %}
{% tab title="⭐ Görsel" %}
![](.gitbook/assets/image%20%289%29.png)
{% endtab %}

{% tab title="📜 XML Kodları" %}
```markup
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
Expand All @@ -15,10 +22,10 @@ Proje dizinine `anim` adlı klasör oluşturup içinde bir `resource file'`a bu
android:fromYDelta="100%p"/>
</set>
```
{% endtab %}

`Main`'e alttakiler eklenmeli:

```text
{% tab title="👨‍💻 Main Kodları" %}
```java
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -28,19 +35,24 @@ class MainActivity : AppCompatActivity() {
...
}
```

* `btn_start` = Get Started adlı view'ın ID'si
* `frombutton` = üstteki kodların yazıldığı dosyanın adı
{% endtab %}
{% endtabs %}

## 👁‍🗨 Soluk Belirme

![](../.gitbook/assets/image%20%2822%29.png)
{% tabs %}
{% tab title="⭐ Görsel" %}
![](.gitbook/assets/image%20%2810%29.png)
{% endtab %}

{% tab title="📜 XML Kodları" %}
```markup
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="2000"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
```
{% endtab %}
{% endtabs %}

8 changes: 5 additions & 3 deletions arkaplanda-calisma/asynctask-ve-asynctaskloader.md
Expand Up @@ -29,7 +29,7 @@ Android'teki tüm görüntü işlemlerinin yapıldı alandır.
* UI Thread sadece görsel işlemler için kullanılmalıdır
* Tüm işlemler 16ms'den kısa bir sürede tamamlanmalıdır

![](../.gitbook/assets/image%20%2818%29.png)
![](../.gitbook/assets/image%20%2820%29.png)

{% hint style="danger" %}
Yaklaşık olarak 5s'den uzun süren işlemler "[application not responding](http://developer.android.com/guide/practices/responsiveness.html)" \(ANR\) diyaloğunu oluşturur ve kullanıcı bunu görmesi durumunda uygulamayı kapatıp, siler 😥
Expand All @@ -50,9 +50,9 @@ Verilen işlemi arkaplanda, sistemi bloklamadan tamamlar.

{% tabs %}
{% tab title="🎈 Kullanım" %}
![](../.gitbook/assets/image%20%2812%29.png)
![](../.gitbook/assets/image%20%2814%29.png)

![](../.gitbook/assets/image%20%289%29.png)
![](../.gitbook/assets/image%20%2811%29.png)

| 💠 Metot | 📜 Açıklama |
| :--- | :--- |
Expand Down Expand Up @@ -126,5 +126,7 @@ private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> {
{% endtab %}
{% endtabs %}

## 🔗 Harici Bağlantılar

{% embed url="https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/unit-3-working-in-the-background/lesson-7-background-tasks/7-1-c-asynctask-and-asynctaskloader/7-1-c-asynctask-and-asynctaskloader.html" %}

2 changes: 2 additions & 0 deletions duezensiz-notlar/README.md
@@ -0,0 +1,2 @@
# 🥴 Düzensiz Notlar

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
239 changes: 239 additions & 0 deletions faydali-bilgiler/activity-notlari.md
@@ -0,0 +1,239 @@
---
description: Activity'ler için faydalı örnekler
---

# ⭐ Activity Örnekleri

## 🚶‍♂️ Gecikmeli Activity Başlatma

```java
Handler().postDelayed({ startActivity(Intent(this, SnakeActivity1::class.java))
}, 400)
```

## 🌃 Arka planda Çalıştırma

```java
override fun onCreate(savedInstanceState: Bundle?) {
// Arkaplanda çalıştırma
moveTaskToBack(true)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_share)

...
}
```

## 🧹 Bütün Eski Activity'leri Sonlandırıp Yeni Activity Açma

```java
val intent = Intent(this, MainActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK // Tüm işlemleri bitirme
finish() // İşlemi sonlandırma
startActivity(intent)
```

## ⏩ Kaydırmalı Uygulama \(ViewPager ve PageAdapter\)

{% tabs %}
{% tab title="⭐ Örnek" %}
![](../.gitbook/assets/image%20%2827%29.png)
{% endtab %}

{% tab title="Manifest" %}
```markup
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yemreak.iuapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:theme="@style/LogInTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
```
{% endtab %}

{% tab title="Main" %}
```java
package com.yemreak.iuapp

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v4.view.ViewPager
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

private lateinit var slideAdapter: SlideAdapter

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

slideAdapter = SlideAdapter(applicationContext)
vp_main.adapter = slideAdapter
}}
...
}
```
{% endtab %}

{% tab title="SlideAdapter" %}
```java
package com.yemreak.iuapp

import android.content.Context
import android.graphics.Color
import android.support.v4.view.PagerAdapter
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView

class SlideAdapter(context : Context) : PagerAdapter() {

lateinit var layoutInflater: LayoutInflater

private val context = context
private val arr_images = arrayListOf(
R.drawable.ic_launcher_foreground,
R.drawable.ic_launcher_foreground,
R.drawable.water,
R.drawable.text
)
private val arr_titles = arrayListOf("a", "b", "c", "d")
private val arr_descriptions = arrayListOf("aa", "bb", "cc", "dd")
private val arr_bgColors = arrayListOf(
Color.rgb(55, 55, 55),
Color.rgb(239, 85, 85),
Color.rgb(110, 49, 89),
Color.rgb(1, 118, 212)
)



override fun isViewFromObject(view: View, `object` : Any): Boolean {
return (view == `object` as LinearLayout)
}

override fun getCount(): Int {
return arr_images.size
}

override fun instantiateItem(container: ViewGroup, position: Int): Any {
layoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater

val view = layoutInflater.inflate(R.layout.slide, container, false)
val layout = view.findViewById<LinearLayout>(R.id.ll_slide1)
val image = view.findViewById<ImageView>(R.id.iv_slide)
val title = view.findViewById<TextView>(R.id.tv_slide_tittle)
val description = view.findViewById<TextView>(R.id.tv_slide_description)

layout.setBackgroundColor(arr_bgColors[position])
image.setImageResource(arr_images[position])
title.text = arr_titles[position]
description.text = arr_descriptions[position]
container.addView(view)
return view
}
override fun destroyItem(container: ViewGroup, position: Int, `object` : Any) { container.removeView(`object` as LinearLayout) }
}
```
{% endtab %}

{% tab title="Styles.xml" %}
```markup
<resources>
<!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style>
<style name="LogInTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style>
</resources>
```
{% endtab %}

{% tab title="String.xml" %}
```markup
<resources>
<string name="app_name">IUApp</string>
<string name="title_login">Bu uygulama da nedir?</string>
</resources>
```
{% endtab %}

{% tab title="activity\_main" %}
```markup
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">

<android.support.v4.view.ViewPager
android:id="@+id/vp_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

</LinearLayout>
```
{% endtab %}

{% tab title="Slide.xml" %}
```markup
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_slide1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">

<ImageView
android:id="@+id/iv_slide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/ic_launcher"/>
<TextView
android:id="@+id/tv_slide_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_login"
android:textSize="30sp"
android:textStyle="bold"
android:textAlignment="center"
android:layout_marginTop="40dp"/>
<TextView
android:id="@+id/tv_slide_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_login"
android:textSize="21sp"
android:textAlignment="center"
android:layout_marginTop="40dp"/>

</LinearLayout>
```
{% endtab %}
{% endtabs %}

0 comments on commit 561c8d3

Please sign in to comment.