Alperen Eker
Alperen Eker
Ece Yazılım Çorum
04/11/2015 tarihinden beri üye
1395 GY Puanı
2K GY Sırası
4 Rozet
0 Sertifika
17 Soru Sordu
17 Cevap Verdi
1 Blog Yazısı
0 Etiket Takibi

Hakkında

İş Tecrubesi

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

Eğitim Geçmişi

Kullanıcıya ait Eğitim geçmişi bilgisi bulunmamaktadır.

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

34
Tümünü Gör

Android Veritabanı Delete

Merhaba ,

RecyclerView.Adapter ımda imagebutton'a tıklandığında tıklanan verinin ID alıp veritbanındaki DELETE methoduma göndermesini istiyorum ama ID yi alamadım ve aldıktan sonra neyi çalıştıracağım.. onBindViewHolder kod parçacığım

   @Override
    public void onBindViewHolder(final ViewHolder holder,final int position)
    {
         final WebItem s = list_garson.get(position);
        holder.txt_garson_isim.setText(list_garson.get(position).getLog_kullaniciIsim());
     //   holder.txt_garson_kullaniciAdi.setText(list_garson.get(position).getLog_kullaniciAdi());
     //   holder.txt_garson_sifre.setText(list_garson.get(position).getLog_sifre());

        holder.btn_garsonuSil.setImageResource(R.drawable.delete);
        holder.btn_garsonuSil.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v)
            {

                Bundle args = new Bundle();
                args.putInt("id", s.getKullanici_id());


            }
        });

    }

 

btn_garsonuSil e tıklandığında id yi alıp aşağıdaki gibi ASYNC nin çalışmasını istiyorum 

    private class addGarsonASYNC extends AsyncTask<Void,Void,Void>
    {

        private String id;

        addGarsonASYNC(String id){
            this.id = id;
        }



        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }

        @Override
        protected Void doInBackground(Void... params)
        {
            SoapObject soapObject=new SoapObject(NameSpace.NAMESPACE, Methods.getGarsonAdd);

            soapObject.addProperty("id", id.toString ());

            soapSerializationEnvelope.dotNet = true;
            soapSerializationEnvelope.implicitTypes=true;
            soapSerializationEnvelope.setOutputSoapObject(soapObject);
            try
            {
                httpTransport.call(Actions.getGarsonAdd, soapSerializationEnvelope);
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            catch (XmlPullParserException e)
            {
                e.printStackTrace();
            }
            return null;
        }



        @Override
        protected void onPostExecute(Void aVoid) {
            return ;
        }
    }

 

picture-64357-1469476477.jpg
7 yıl 8 ay önce yanıtladın

Fragment Sayfayı ScrollView içine alma

Kod parçacığım aşağıdadır .

Bütün sayfayı ScrollView içine aldığımda hata alıyorum bunu nasıl sağlayabilirim .

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#d8d8d8"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".MainActivity">

    <android.support.v7.widget.CardView
        android:id="@+id/card_view_pager"
        android:layout_width="match_parent"
        android:layout_margin="5dp"
        android:layout_height="200dp">

        <android.support.v4.view.ViewPager
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/pager"
            android:background="#fff"
            android:layout_margin="2dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v7.widget.CardView>

    <android.support.v7.widget.CardView
        android:id="@+id/card_view_category"
        android:layout_width="match_parent"
        android:layout_height="120dp"
        android:layout_margin="5dp"
        android:layout_below="@id/card_view_pager"
        android:background="#000">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:background="#fff"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v7.widget.CardView>

    <android.support.v7.widget.CardView
        android:id="@+id/card_view_randomProduct"
        android:layout_below="@id/card_view_category"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView_randomProduct"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v7.widget.CardView>


</RelativeLayout>

 

picture-64357-1469476477.jpg
8 yıl 1 ay önce yanıtladın

RecyclerView onitemclick

İyi günler ,

RecyclerView kullanarak verilerimi set ettim , her iteme bir click vermem lazım bunu nasıl sağlayacağım .

Görsel kaldırıldı.

Gridview veya listview kullanırken

gridview.setonitemclick(this); // kodunu kullanarak rahatlıkla sağlayabiliyordum

recyclerview de bunu nasıl sağlayabilrim ? ontauch denedim ama bir sonuç alamadım

picture-64357-1469476477.jpg
8 yıl 1 ay önce yanıtladın

extends Fragment yapısında getIntent(); kullanımı

merhaba ,

extends Activity yapısını kullanarak seçilen itemin ' ID ' sine göre itemlerimi listeletebiliyordum

bknz :

Görsel kaldırıldı.

Görsel kaldırıldı.

 

 

ama bunları extends Fragment yapısında kullanamıyorum

bknz :

Görsel kaldırıldı.

Görsel kaldırıldı.

 

 

getIntent(); i import ettiğim zamanda çalışmıyor program bunun için ne kullanmalıyım

picture-64357-1469476477.jpg
8 yıl 1 ay önce yanıtladın

Fragmentte itemclicklistener kullanarak put ile ID gönderme

İyi günler normal bir Activity sayfasında onitemclick kullanarak tıkladığım itemin id sini alabiliyordum

@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
    Object obj = parent.getItemAtPosition(position);
    for (Item kt : Lists.categories)
    {
        if (kt.getCategory_name().equals(obj.toString()))
            category_id = kt.getCategory_id();
    }
    Intent intent = new Intent(this, Shops.class);
    intent.putExtra("ID", category_id);
    startActivity(intent);
}


bu kod parçacığı ile Activity ile tıklanan itemin ID sini çekebiliyordum.

Fragment Yapısı kullandığım zaman 'FragmentTransaction' ile başka başka bir fragmente itemclick yapabiliyorum .

@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
    Object obj = parent.getItemAtPosition(position);
    for (Item kt : Lists.categories)
    {
        if (kt.getCategory_name().equals(obj.toString()))
            category_id = kt.getCategory_id();
    }
 Bundle bundle = new Bundle();
 bundle.putInt("ID",category_id);
 Fragment productFragment = new ProductFragment();
 FragmentTransaction transaction = getFragmentManager().beginTransaction();
 transaction.replace(R.id.container, productFragment);
 transaction.addToBackStack(null);
 transaction.commit();
}

 

 

picture-64357-1469476477.jpg
8 yıl 2 ay önce yanıtladın

Tel No get

picture-64357-1469476477.jpg
30 Temmuz 2016 tarihinde cevaplandı

evet çekebilirsin , uzakta bir veritabanın olması lazım girilen veriyi çekmen için pek çok kütüphane mevcut .

volley , ksoap ... 

 

Androidde c# yazarak webservisten veri çekememek

İyi geceler ,

Github hesabımda yaptığım bir web servisim mevcut

Veritabanındaki (MSSQL) verileri json dönüştürüyor gerekli yerleri editleyip kullanabilirsiniz

https://github.com/bestekarx/Web-Service-To-JSON-Parse/blob/master/Get.asmx.cs

Fragment Sayfayı ScrollView içine alma

picture-64357-1469476477.jpg
15 Mart 2016 tarihinde cevaplandı

Yukarıdaki kodu şöyle değiştirdim :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#d8d8d8"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".MainActivity">


    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">



    <android.support.v7.widget.CardView
        android:id="@+id/card_view_pager"
        android:layout_width="match_parent"
        android:layout_margin="5dp"
        android:layout_height="200dp">

        <android.support.v4.view.ViewPager
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/pager"
            android:background="#fff"
            android:layout_margin="2dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v7.widget.CardView>

    <android.support.v7.widget.CardView
        android:id="@+id/card_view_category"
        android:layout_width="match_parent"
        android:layout_height="120dp"
        android:layout_margin="5dp"
        android:layout_below="@id/card_view_pager"
        android:background="#000">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:background="#fff"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v7.widget.CardView>

    <android.support.v7.widget.CardView
        android:id="@+id/card_view_randomProduct"
        android:layout_below="@id/card_view_category"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView_randomProduct"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v7.widget.CardView>

    </ScrollView>

</RelativeLayout>

RelativeLayoutun yerinede ScrollView eklemeyi denedim sonuç aynı aldığım hata :

Görsel kaldırıldı.
 

MainFragmenttaki 80. satır :

Görsel kaldırıldı.

Resimdeki kodlar ne

picture-64357-1469476477.jpg
02 Mart 2016 tarihinde cevaplandı

Android Studio'da derlenmiş , java diye düşünüyorum :)

JSON ile veri çekmek ve Listeview 'e Aktarmak ?

picture-64357-1469476477.jpg
28 Şubat 2016 tarihinde cevaplandı

Mobilhanem.com da JSON parse işlemi ve nasıl kullanacağın hakkında bir çok ders var

bknz :

http://www.mobilhanem.com/android-gson-kullanarak-json-parse-etme/

http://www.mobilhanem.com/android-volley-kullanimi-ve-json-parse-etme/

http://www.mobilhanem.com/android-http-post-ve-json-parse-etme/