selim
selim
Balıkesir
01/04/2016 tarihinden beri üye
145 GY Puanı
36K GY Sırası

Kişisel Sayfaları

İlgi Alanları

2 Rozet
0 Sertifika
4 Soru Sordu
7 Cevap Verdi
0 Blog Yazısı
0 Etiket Takibi

Hakkında

İş Tecrubesi

Kullanıcıya ait İş tecrübesi bilgisi bulunmamaktadır.

Eğitim Geçmişi

Uludağ Üniversitesi
| Aralık 2020 - Aralık 2020

Sertifikalar & Başarılar

GY Sertifikaları (0)
Kullanıcının GY sertifikası bulunmamaktadır.
Diğer Sertifikaları (0)
Kullanıcıya ait sertifika bulunmamaktadır.
Test Sonuçları (0)

Kullanıcıya ait test sonucu bulunmamaktadır.

Dil Becerileri

Son Forum Aktiviteleri

11
Tümünü Gör

cannot resolve symbol moveToNext

Bu hatayı alıyorum. Neden olabilir acaba?

8 yıl önce yanıtladın

Sqlite veri Çekme

Merhabalar;

Android ve Java hakkında bilgim çok az hatta hiç yok. Çoktan seçmeli test uygulaması yapmaya çalışıyorum. Biraz yardım alarak, biraz araştırma yaparak,  biraz deneme yanılma yolu ile biraz yol katettim. Test ekranını hazırladım. Kullanıcı cevapları işaretleyebiliyor, "doğru cevabı göster" butonu ile doğru cevabı işaretleyebiliyorum. Excelde soruları hazırlayıp "kpsssorular.db" adlı bir sqlite dosyasına dönüştürdüm. Bu dosyayı data>data>databases klasörüne atmayı başardım. Şimdi yapmam gereken ise "sonraki soru" butonuna basıldığında rasgele bir sorunun ve şıklarının ekrana gelmesi. Bunu başarabilmek için nasıl kod yada kodlar yazmalıyım? 

Not: İlgili resimler ektedir. 

8 yıl önce yanıtladın

Buton Renklendirme

Merhabalar;

Çoktan seçmeli bir test uygulaması yapmaya çalışmaktayım. Java ve android hakkında bilgim yok sayılır. Şuana kadar Ana menüyü ve çoktan seçmeli test ekranı menüsünü ve ana menüden çoktan seçmeli test ekranına geçişi başarabildim. Şimdi yapmak istediğim ise kullanıcı cevap şıklarına dokunduğunda dokunulan butonun kırmızı renge dönüşmesi. Ancak bunu yaparken cevabı değiştirmek istediğinde diğer butona bastığında ilk butonun rengi kırmızıdan öncekine dönmeli ve yeni seçim kırmızı olmalı. 

A butonu id: button3

B butonu id: button4

C butonu id: button5

D butonu id: button6

E butonu id: button7

başka bir bilgi gerekiyo mu bilmiyorum :( 

Anlatmaya çalıştığımı başarabilmek için nerelere hangi kodları yazmam gerekiyor?

 

 

8 yıl önce yanıtladın

SQlite dosyası

Merhabalar, 

Öncelikle durumumu açıklayayım. Android studio ile çoktan seçmeli test uygulaması oluşturmaya çalışıyorum. Konu hakkında bilgim hiç yok denecek kadar az.

Yapmak istediğime yakın bir proje buldum. Soruların bulunduğu sqlite dosyasını benim hazırladığım ile değiştirmek istiyorum. Ama Android Studio içinde bu dosyayı bir türlü bulamadım.

Bahsettiğim dosyayı nasıl görebilirim? ve nasıl değiştirebilirim? 

8 yıl 1 ay önce yanıtladın

Sqlite veri Çekme

14 Nisan 2016 tarihinde cevaplandı

Elimizde bir activity ekranı var ekranda 1 tane Textview ve 8 tane button var. Database klasöründe “kpsssorular.db” adında  bir sqlite dosyası var. “sonraki soru” butonuna tıkladığımızda dosyadan ekranda bulunan textview ve butonlara veri çekilmesi gerekiyor. Bilgiler aşağıda çıkarılmıştır.

 

Activitiy java adı: tarihekrani

Textview İD: tv1

Buton ID’leri: btn3, btn4, btn5, btn6, btn7, btn9, btn10

Buton isimleri sırasıyla: ASIKKI, BSIKKI, CSIKKI, DSIKKI,ESIKKI,SONRAKİ SORU,

Sqlite dosya adı: kpsssorular.db

Tablo adı: kpsssorularr

Sütun adları: numara, soru, acevap, bcevap, ccevap, dcevap, ecevap, fcevap

 

Eşleşme şu şekilde olmalı:

Sonraki soru: btn9 (bu butona tıklandığında rasgele soru gelmeli)

tv1=soru

btn3=acevap

btn4=bcevap

btn5=ccevap

btn6=dcevap

btn7=ecevap

btn10=fcevap

 

Bu işlemi görecek kodlara ihtiyacım var. Sağ olsunlar bazı arkadaşlar yol gösterdi, tarif etti ama bir türlü başaramadım. İlgili resimler ilk mesajdadır.

Bu işlemi görecek kodları yazar mısınız?

cannot resolve symbol moveToNext

12 Nisan 2016 tarihinde cevaplandı
package com.example.selim.kpss2;

import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.common.api.GoogleApiClient;


public class Tarihekrani extends Activity {

    TextView tv1;
    Button btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn10;

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */
    private GoogleApiClient client;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tarih_ekrani);

        tv1 = (TextView) findViewById(R.id.textView);
        btn3 = (Button) findViewById(R.id.button3);
        btn4 = (Button) findViewById(R.id.button4);
        btn5 = (Button) findViewById(R.id.button5);
        btn6 = (Button) findViewById(R.id.button6);
        btn7 = (Button) findViewById(R.id.button7);
        btn8 = (Button) findViewById(R.id.button8);
        btn9 = (Button) findViewById(R.id.button9);
        btn10 = (Button) findViewById(R.id.button10);

        btn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn3.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "A Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn4.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "B Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn5.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "C Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn6.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "D Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "E Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }

        });



        btn9.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn3.setText("bilmiyom ki");
                btn4.setText("Bende bilmiyom");
                btn5.setText("Ben hiç bilmiyom:)");
                btn6.setText("Bi yerden bulacaz artık :)");
                btn7.setText("SQlite databasesten çekmeliyiz ama nasıl?:)");
                btn10.setText("SQlite databasesten çekmeliyiz ama nasıl?:)");
            }

        });
        btn8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if(btn10.getText() == btn3.getText()) {
                    btn3.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
                }
                else if (btn10.getText() == btn4.getText()){
                    btn4.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
                }
                else if (btn10.getText() == btn5.getText()){
                    btn5.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
                }
                else if (btn10.getText() == btn6.getText()){
                    btn6.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
                }
                else if (btn10.getText() == btn7.getText()){
                    btn7.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
                }
            }

        });







        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
    }


    @Override
    public void onStart() {
        super.onStart();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client.connect();
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Tarihekrani Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.
                Uri.parse("http://host/path"),
                // TODO: Make sure this auto-generated app deep link URI is correct.
                Uri.parse("android-app://com.example.selim.kpss2/http/host/path")
        );
        AppIndex.AppIndexApi.start(client, viewAction);
    }

    @Override
    public void onStop() {
        super.onStop();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Tarihekrani Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.
                Uri.parse("http://host/path"),
                // TODO: Make sure this auto-generated app deep link URI is correct.
                Uri.parse("android-app://com.example.selim.kpss2/http/host/path")
        );
        AppIndex.AppIndexApi.end(client, viewAction);
        client.disconnect();
    }

    SQLiteDatabase dtb=openOrCreateDatabase("kpsssorular.db", Context.MODE_PRIVATE,null);
    Cursor cursor = dtb.rawQuery("SELECT * FROM SORUTABLOSU LIMIT 1 OFFSET 3", null);
    while(cursor.moveToNext()){
        String soru = cursor.getString(2);

    }

}

 

Sqlite veri Çekme

11 Nisan 2016 tarihinde cevaplandı

diğer dosya

Buton Renklendirme

11 Nisan 2016 tarihinde cevaplandı

Sayın Emre Taşbaş; 

Verdiğiniz kodlarla uğraşmama rağmen başaramadım. Mutlaka benim eksikliğim. Daha basit bir yöntremi olduğuna min olmakla birlikte o yolu bulamadım ama işimin çözümünü de bulmuş bulunmaktayım. Lazım olan arkadaşlar olur diye kendi çözümümü payhlaşıyorum.

import com.google.android.gms.common.api.GoogleApiClient;


public class Tarihekrani extends Activity {

    TextView tv1;
    Button btn3, btn4, btn5, btn6, btn7, btn8, btn9;
    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */
    private GoogleApiClient client;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tarih_ekrani);

        tv1 = (TextView) findViewById(R.id.textView);
        btn3 = (Button) findViewById(R.id.button3);
        btn4 = (Button) findViewById(R.id.button4);
        btn5 = (Button) findViewById(R.id.button5);
        btn6 = (Button) findViewById(R.id.button6);
        btn7 = (Button) findViewById(R.id.button7);
        btn8 = (Button) findViewById(R.id.button8);
        btn9 = (Button) findViewById(R.id.button9);

        btn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn3.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "A Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn4.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "B Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn5.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "C Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn7.getBackground().clearColorFilter();
                btn6.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "D Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }
        });
        btn7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn3.getBackground().clearColorFilter();
                btn4.getBackground().clearColorFilter();
                btn5.getBackground().clearColorFilter();
                btn6.getBackground().clearColorFilter();
                btn7.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
                Toast.makeText(Tarihekrani.this, "E Şıkkını İşaretlediniz!", Toast.LENGTH_SHORT).show();
            }

        });
       







        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
    }


    @Override
    public void onStart() {
        super.onStart();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        client.connect();
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Tarihekrani Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.
                Uri.parse("http://host/path"),
                // TODO: Make sure this auto-generated app deep link URI is correct.
                Uri.parse("android-app://com.example.recep.kpss2/http/host/path")
        );
        AppIndex.AppIndexApi.start(client, viewAction);
    }

    @Override
    public void onStop() {
        super.onStop();

        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
        Action viewAction = Action.newAction(
                Action.TYPE_VIEW, // TODO: choose an action type.
                "Tarihekrani Page", // TODO: Define a title for the content shown.
                // TODO: If you have web page content that matches this app activity's content,
                // make sure this auto-generated web page URL is correct.
                // Otherwise, set the URL to null.
                Uri.parse("http://host/path"),
                // TODO: Make sure this auto-generated app deep link URI is correct.
                Uri.parse("android-app://com.example.recep.kpss2/http/host/path")
        );
        AppIndex.AppIndexApi.end(client, viewAction);
        client.disconnect();
    }
}

 

SQlite dosyası

05 Nisan 2016 tarihinde cevaplandı

databases klasörünü bulamadım