Cuma
Cuma
Gaziantep
09/03/2014 tarihinden beri üye
1285 GY Puanı
2K GY Sırası

Kişisel Sayfaları

İlgi Alanları

3 Rozet
0 Sertifika
35 Soru Sordu
18 Cevap Verdi
0 Blog Yazısı
0 Etiket Takibi

Hakkında

16 Yaşında android programlamaya merak salmış bir lise öğrencisiyim.

16 Yaşında android programlamaya merak salmış bir lise öğrencisiyim.

İş 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

53
Tümünü Gör

CardView içerisindeki RadioButton otomatik olarak seçiliyor

Geliştirmekte olduğum test çözme özelliğinde şöyle garip bir  hata ile karşı karşıyayım. WebService'den Json formatında verileri çekiyorum ve çektiğim array i recyclerview ile listeliyorum. Soru ve 4 adet şıktan oluşan her item'ı cardviewler içerisinde gösteriyorum. Şıkları radiobutton olarak göstermeyi tercih ettim. 20 tane soruyu cardviewler içerisinde listeledim ve birinci sorunun A şıkkını seçtiğim zaman aynı anda 7. 13. ve 19.sorularında A şıkkı kendiliğinden seçiliyor. 6 soruda bir tekrar eden bu hatayı kodlarda 6 ile ilgili bir şeyler arayarak bulmaya çalıştım fakat 6 ile alakalı hiç bir kodum yok. Test sorularının listelendiği activity ve CardAdapter ı şöyle : 

TestActivity.class


import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.Toast;

import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonArrayRequest;
import com.android.volley.toolbox.Volley;
import com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork;
import com.ogrenciasistani.lgsasistan.R;
import com.ogrenciasistani.lgsasistan.adapters.CardAdapter;
import com.ogrenciasistani.lgsasistan.configs.Config;
import com.ogrenciasistani.lgsasistan.models.SuperHero;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;

public class TestActivity extends AppCompatActivity {

    //Creating a List of superheroes
    private List<SuperHero> listSuperHeroes;

    //Creating Views
    private RecyclerView recyclerView;
    private RecyclerView.LayoutManager layoutManager;
    private RecyclerView.Adapter adapter;

    //Volley Request Queue
    private RequestQueue requestQueue;

    //The request counter to send ?page=1, ?page=2  requests
    private int requestCount;
    private String CONFIG_URL;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test_fragment);

        String testNo = getIntent().getExtras().getString("testno").toString();
        setTitle(testNo);

        String whichSubject = getIntent().getExtras().getString("whichSubject").toString();
        if (whichSubject.equals("Turkce")) {
            CONFIG_URL = Config.DATA_URL;
        } else if (whichSubject.equals("Math")) {
            CONFIG_URL = Config.DATA_URL_MATH;
        } else if (whichSubject.equals("Science")) {
            CONFIG_URL = Config.DATA_URL_SCIENCE;
        } else if (whichSubject.equals("History")) {
            CONFIG_URL = Config.DATA_URL_HISTORY;
        } else if (whichSubject.equals("English")) {
            CONFIG_URL = Config.DATA_URL_ENGLISH;
        } else {
            Toast.makeText(this, "whichSubject is null", Toast.LENGTH_SHORT).show();
        }


        requestCount = getIntent().getExtras().getInt("testnoint");

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);

        //Initializing Views
        recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
        layoutManager = new LinearLayoutManager(this);
        recyclerView.setLayoutManager(layoutManager);

        //Initializing our superheroes list
        listSuperHeroes = new ArrayList<>();
        requestQueue = Volley.newRequestQueue(getApplicationContext());

        //Calling method to get data to fetch data
        getData();

        /*
        //Adding an scroll change listener to recyclerview
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            recyclerView.setOnScrollChangeListener(this);
        }
        */

        //initializing our adapter
        adapter = new CardAdapter(listSuperHeroes, getApplicationContext());

        //Adding adapter to recyclerview
        recyclerView.setAdapter(adapter);

    }


    //Request to get json from server we are passing an integer here
    //This integer will used to specify the page number for the request ?page = requestcount
    //This method would return a JsonArrayRequest that will be added to the request queue
    private JsonArrayRequest getDataFromServer(int requestCount) {
        //Initializing ProgressBar
        final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar1);

        //Displaying Progressbar
        progressBar.setVisibility(View.VISIBLE);
        setProgressBarIndeterminateVisibility(true);

        //JsonArrayRequest of volley
        JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(CONFIG_URL + String.valueOf(requestCount),
                new Response.Listener<JSONArray>() {
                    @Override
                    public void onResponse(JSONArray response) {
                        //Calling method parseData to parse the json response
                        parseData(response);
                        //Hiding the progressbar
                        progressBar.setVisibility(View.GONE);
                    }
                },
                new Response.ErrorListener() {
                    @Override
                    public void onErrorResponse(VolleyError error) {
                        progressBar.setVisibility(View.GONE);
                        //If an error occurs that means end of the list has reached
                        Toast.makeText(getApplicationContext(), "Daha fazla soru yok.", Toast.LENGTH_SHORT).show();
                    }
                });

        //Returning the request
        return jsonArrayRequest;
    }

    //This method will get data from the web api
    private void getData() {
        //Adding the method to the queue by calling the method getDataFromServer
        requestQueue.add(getDataFromServer(requestCount));
        //Incrementing the request counter
        //requestCount++;  // kaldırmayı dene ne olacak gör ?
    }

    //This method will parse json data
    private void parseData(JSONArray array) {
        for (int i = 0; i < array.length(); i++) {
            //Creating the superhero object
            SuperHero superHero = new SuperHero();
            JSONObject json = null;
            try {
                //Getting json
                json = array.getJSONObject(i);

                //Adding data to the superhero object
                superHero.setSorutitle(json.getString(Config.TAG_SORU_TITLE));
                superHero.setSoruoption1(json.getString(Config.TAG_SORU_OPTION_1));
                superHero.setSoruoption2(json.getString(Config.TAG_SORU_OPTION_2));
                superHero.setSoruoption3(json.getString(Config.TAG_SORU_OPTION_3));
                superHero.setSoruoption4(json.getString(Config.TAG_SORU_OPTION_4));
                superHero.setSorucevap(json.getString(Config.TAG_SORU_CEVAP));
            } catch (JSONException e) {
                e.printStackTrace();
            }
            //Adding the superhero object to the list
            listSuperHeroes.add(superHero);
        }

        //Notifying the adapter that data has been added or changed
        adapter.notifyDataSetChanged();
    }

    //This method would check that the recyclerview scroll has reached the bottom or not
    private boolean isLastItemDisplaying(RecyclerView recyclerView) {
        if (recyclerView.getAdapter().getItemCount() != 0) {
            int lastVisibleItemPosition = ((LinearLayoutManager) recyclerView.getLayoutManager()).findLastCompletelyVisibleItemPosition();
            if (lastVisibleItemPosition != RecyclerView.NO_POSITION && lastVisibleItemPosition == recyclerView.getAdapter().getItemCount() - 1)
                return true;
        }
        return false;
    }


    /*
    //Overriden method to detect scrolling
    @Override
    public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
        //Ifscrolled at last then
        if (isLastItemDisplaying(recyclerView)) {
            //Calling the method getdata again
            getData();
        }
    }
    */

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_test, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        if (item.getItemId() == android.R.id.home) {
            finish(); // close this activity and return to preview activity (if there is any)
        } else if (id == R.id.end){

        } else if (id == R.id.answerkey){

        }

        return super.onOptionsItemSelected(item);
    }

}

CardAdapter.class


import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.NetworkImageView;
import com.ogrenciasistani.lgsasistan.R;
import com.ogrenciasistani.lgsasistan.helper.CustomVolleyRequest;
import com.ogrenciasistani.lgsasistan.models.SuperHero;

import java.util.List;


/**
 * Created by cumakesici on 01/06/2017.
 */

public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHolder> {
    SuperHero superHero;
    private Context context;

    //List to store all superheroes
    List<SuperHero> superHeroes;

    //Constructor of this class
    public CardAdapter(List<SuperHero> superHeroes, Context context) {
        super();
        //Getting all superheroes
        this.superHeroes = superHeroes;
        this.context = context;
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View v = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.superheroes_list, parent, false);
        ViewHolder viewHolder = new ViewHolder(v);
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, final int position) {

        //Getting the particular item from the list
        superHero = superHeroes.get(position);


        /*
        //Loading image from url
        imageLoader = CustomVolleyRequest.getInstance(context).getImageLoader();
        imageLoader.get(superHero.getImage(), ImageLoader.getImageListener(holder.imageView, android.R.drawable.ic_dialog_alert, android.R.drawable.ic_dialog_alert));
        */
        //Showing data on the views
        //holder.imageView.setImageUrl(superHero.getImage(), imageLoader);

        holder.soruTitle.setText(superHero.getSorutitle());
        holder.soruOption1.setText(superHero.getSoruoption1());
        holder.soruOption2.setText(superHero.getSoruoption2());
        holder.soruOption3.setText(superHero.getSoruoption3());
        holder.soruOption4.setText(superHero.getSoruoption4());
        String soruCevap = superHero.getSorucevap().toString();


        holder.soruOption1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {

            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                Toast.makeText(context, position+1 +".sorunun A şıkkına tıklandı.", Toast.LENGTH_SHORT).show();
            }

        });


        holder.soruOption2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                Toast.makeText(context, position+1 +".sorunun B şıkkına tıklandı.", Toast.LENGTH_SHORT).show();

            }
        });

        holder.soruOption3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                Toast.makeText(context, position+1 +".sorunun C şıkkına tıklandı.", Toast.LENGTH_SHORT).show();

            }
        });

        holder.soruOption4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                Toast.makeText(context, position+1 +".sorunun D şıkkına tıklandı.", Toast.LENGTH_SHORT).show();

            }
        });

    }

    @Override
    public int getItemCount() {
        return superHeroes.size();
    }

    class ViewHolder extends RecyclerView.ViewHolder {

        public TextView soruTitle;
        public RadioButton soruOption1;
        public RadioButton soruOption2;
        public RadioButton soruOption3;
        public RadioButton soruOption4;
        public TextView soruCevap;

        //Initializing Views
        public ViewHolder(final View itemView) {
            super(itemView);


            soruTitle = (TextView) itemView.findViewById(R.id.soruTitle);
            soruOption1 = (RadioButton) itemView.findViewById(R.id.soruOption1);
            soruOption2 = (RadioButton) itemView.findViewById(R.id.soruOption2);
            soruOption3 = (RadioButton) itemView.findViewById(R.id.soruOption3);
            soruOption4 = (RadioButton) itemView.findViewById(R.id.soruOption4);

        }


        /*
        @Override
        public void onClick(View view) {
            Toast.makeText(view.getContext(), "position = " + getPosition(), Toast.LENGTH_SHORT).show();
            Intent intent = new Intent(context,DetailActivity.class);
            intent.putExtra("title",superHero.getTitle());
            intent.putExtra("detail",superHero.getDetail());
            intent.putExtra("image",superHero.getImage());
            intent.putExtra("author_name",superHero.getAuthor_name());
            intent.putExtra("author_avatar",superHero.getAuthor_avatar());
            intent.putExtra("date",superHero.getDate());
            intent.putExtra("share_link", superHero.getShareLink());

            context.startActivity(intent);
        }

        */
    }


}

SuperHero.class


public class SuperHero {

    private String sorutitle;
    private String soruoption1;
    private String soruoption2;
    private String soruoption3;
    private String soruoption4;
    private String sorucevap;

    public String getSorutitle() {
        return sorutitle;
    }

    public void setSorutitle(String sorutitle) {
        this.sorutitle = sorutitle;
    }

    public String getSoruoption1() {
        return soruoption1;
    }

    public void setSoruoption1(String soruoption1) {
        this.soruoption1 = soruoption1;
    }

    public String getSoruoption2() {
        return soruoption2;
    }

    public void setSoruoption2(String soruoption2) {
        this.soruoption2 = soruoption2;
    }

    public String getSoruoption3() {
        return soruoption3;
    }

    public void setSoruoption3(String soruoption3) {
        this.soruoption3 = soruoption3;
    }

    public String getSoruoption4() {
        return soruoption4;
    }

    public void setSoruoption4(String soruoption4) {
        this.soruoption4 = soruoption4;
    }

    public String getSorucevap() {
        return sorucevap;
    }

    public void setSorucevap(String sorucevap) {
        this.sorucevap = sorucevap;
    }
}

 

 

 

if-else yapısını kullanamadım ?

arkadaşlar öncelikle yapmak istediğimi açıklayayım daha sonra kodları vereyim.

4 takımı random olarak textview'e yazdırıyorum. sonra textview'i string'e çeviriyorum sonra eğer random olarak gelen string "X Takımı" na eşit olursa iki tane linearlayout'un setBackgroundColor yapıcam. Ve bu işlemi 4 takım içinde yapmalıyım yani 

eğer X takımına eşitse x takımının renklerini 

Y takımına eşitse y takımının renkleri gibi ....

 

Kodlarım : 

Button bPlayer1, bPlayer2, bPlayer3, bPlayer4;
    TextView currentTeam, prevTeam;
    LinearLayout color1, color2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        bPlayer1 = (Button)findViewById(R.id.player1);
        bPlayer2 = (Button)findViewById(R.id.player2);
        bPlayer3 = (Button)findViewById(R.id.player3);
        bPlayer4 = (Button)findViewById(R.id.player4);

        currentTeam = (TextView)findViewById(R.id.currentTeam);
        prevTeam = (TextView)findViewById(R.id.prevTeam);

        color1 = (LinearLayout)findViewById(R.id.teamColor1);
        color2 = (LinearLayout)findViewById(R.id.teamColor2);

        final String [] Teams = {"Fenerbahçe", "Galatasaray" , "Beşiktaş" , "Trabzonspor"};
        
        bPlayer2.setEnabled(false);
        bPlayer3.setEnabled(false);
        bPlayer4.setEnabled(false);

        final String curTeamName = currentTeam.getText().toString();
        bPlayer1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {




                int rand = (int) (Math.random() * 4);
                currentTeam.setText(Teams[rand]);

               // Toast.makeText(getApplicationContext(), "Takım Değişti. Sıradaki Oyuncu...", Toast.LENGTH_SHORT).show();




                /*bPlayer1.setEnabled(false);
                bPlayer2.setEnabled(true);
                    */



            }
        });


    }


}

 

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

Google Play Store uygulamamı reddetti

Arkadaşlar uygulamayı yükledim fakat 1 saat geçmeden uygulama reddedildi diye mail gönderdiler. Öncelikle daha önce başıma gelenleri anlatayım kısaca benim daha önce kendi adıma kendi kartımdan ödediğim ve aldığım geliştirici hesabım vardı kapandı askıya alınan uygulamalardan dolayı. Ardından baya bi aradan sonra bi arkadaşın kartıyla ödediğimiz yine arkadaşın bilgisayarından ve internetinden açtığımız bi hesap var şuan yeni açtık. Ve oraya uygulamayı yükledik. Gelen mail ise şöyle : 

[code]

This is a notification that your application submission, Bugün Ne İzlesem, for package ID com.cmk.wtw, has been rejected. If this submission was an update to an existing app, the version published prior to this update is still available on Google Play.

Please address the issue described below, then submit an update with your changes.

REASON FOR REJECTION:Violation of the intellectual property and impersonation or deceptive behavior provisions of the Content Policy. Please refer to the IP infringement and impersonation policy help article for more information.

Your app and/or elements of its listing on Google Play, including title, description, logo(s), or promotional screenshots must not include unauthorized usage of protected works belonging to a third party.
Your app icon and promotional screenshots must not contain images that appear confusingly similar to existing products.
Protected work could typically include product names, brands, images, logos, music, and similar works.

Please make modifications to your app and/or its listing to bring it into compliance. To do so, remove any content that may be a protected work in your app and/or app listing.

If you are authorized to utilize this content, please contact us via the Google Play Help Center and attach verifiable and accepted proof of permission.

All submission rejections are tracked. Repeated rejections due to policy violations will result in app suspension, at which point this app will count as a strike against the good standing of your developer account and no longer be available on Google Play.

This notification also serves as notice for other apps in your catalog. You can avoid future submission rejections and/or app suspensions by immediately ensuring that no other apps in your catalog are in violation of (but not limited to) the above policy. Before publishing applications, please ensure your apps’ compliance with the Developer Distribution Agreement and Content Policy.

If you feel we have made this determination in error, you can visit this Google Play Help Center article.

The Google Play Team

[/code]

 

Uyarı mesajı ise :

[code]

UYGULAMA REDDEDİLDİ

Gönderdiğiniz uygulama, Fikri Mülkiyet'e ilişkin Google Play Geliştirici Programı Politikası'nı ihlal ettiği için reddedildi. Bu gönderim, mevcut bir uygulamanın güncellemesiyse bu güncellemeden önce yayınlanan sürüm Google Play'de kullanılabilir olmaya devam edecektir. Lütfen telif hakkı ihlali ve kimliğe bürünme yardım makalelerini inceleyin, ardından lisansı olmayan resimleri uygulamanızdan ve/veya girişinizden kaldırın ve uygulamayı tekrar gönderin. Ek ayrıntılar, hesap sahibi e-posta adresinize gönderilmiştir.

[/code]

 

Lütfen yardımcı olun uygulamanın ekran fotoğrafları ve iconları şunlar : 

http://i.hizliresim.com/2gv93q.png

http://i.hizliresim.com/BMoAQg.png

http://i.hizliresim.com/ZD2EBa.png

http://i.hizliresim.com/l7BWGX.png

http://i.hizliresim.com/VV2Mnn.png

http://i.hizliresim.com/n7YW60.png

http://i.hizliresim.com/1yjgWA.png

http://i.hizliresim.com/Ladnzj.png

 

Bir başka uygulama var google play'de hemen hemen birbirine benzeyen uygulamalar film afişlerini içeren bir uygulama o kabul edilmiş fakat benim kendi uygulamam kabul edilmedi.

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

Fragment içinde Json işlemleri

Arkadaşlar Navigation Drawer kullanmak istiyorum ve bu navigation drawer itemlerinin her biri için bir fragment layout ve java dosyasını oluşturdum ardından da : custom list adapter, appcontroller movie. java gibi classlar oluşturdum. Ve son olarak HomeFragment.java dosyasına gerekli kodları yerleştirdim :

HomeFragment.java

[code]

package com.cmk.mdd.activity;

import com.cmk.mdd.R;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.cmk.mdd.adapter.CustomListAdapter;
import com.cmk.mdd.app.AppController;
import com.cmk.mdd.model.Movie;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.ProgressDialog;
import android.util.Log;
import android.widget.ListView;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.VolleyLog;
import com.android.volley.toolbox.JsonArrayRequest;

 

 
public class HomeFragment extends Fragment {
 
    // Log tag
    private static final String TAG = MainActivity.class.getSimpleName();
 
    // Movies json url
    private static final String url = "http://cmksoft.hol.es/popular.json";
    private ProgressDialog pDialog;
    private List<Movie> movieList = new ArrayList<Movie>();
    private ListView listView;
    private CustomListAdapter adapter;
    
    
    public HomeFragment() {
        // Required empty public constructor
    }
 
    public void onCreateView(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        
        listView = (ListView) getView().findViewById(R.id.list);
        adapter = new CustomListAdapter((Activity) getActivity().getBaseContext(), movieList);
        listView.setAdapter(adapter);
 
        pDialog = new ProgressDialog(getActivity());
        // Showing progress dialog before making http request
        pDialog.setMessage("Loading...");
        pDialog.show();
 
        
 
        // Creating volley request obj
        JsonArrayRequest movieReq = new JsonArrayRequest(url,
                new Response.Listener<JSONArray>() {
                    @Override
                    public void onResponse(JSONArray response) {
                        Log.d(TAG, response.toString());
                        hidePDialog();
 
                        // Parsing json
                        for (int i = 0; i < response.length(); i++) {
                            try {
 
                                JSONObject obj = response.getJSONObject(i);
                                Movie movie = new Movie();
                                movie.setTitle(obj.getString("title"));
                                movie.setThumbnailUrl(obj.getString("image"));
                                movie.setRating(((Number) obj.get("rating"))
                                        .doubleValue());
                                movie.setYear(obj.getInt("releaseYear"));
 
                                // Genre is json array
                                JSONArray genreArry = obj.getJSONArray("genre");
                                ArrayList<String> genre = new ArrayList<String>();
                                for (int j = 0; j < genreArry.length(); j++) {
                                    genre.add((String) genreArry.get(j));
                                }
                                movie.setGenre(genre);
 
                                // adding movie to movies array
                                movieList.add(movie);
 
                            } catch (JSONException e) {
                                e.printStackTrace();
                            }
 
                        }
 
                        // notifying list adapter about data changes
                        // so that it renders the list view with updated data
                        adapter.notifyDataSetChanged();
                    }
                }, new Response.ErrorListener() {
                    @Override
                    public void onErrorResponse(VolleyError error) {
                        VolleyLog.d(TAG, "Error: " + error.getMessage());
                        hidePDialog();
 
                    }
                });
 
        // Adding request to request queue
        AppController.getInstance().addToRequestQueue(movieReq);
    }
    
    
        
    @Override
    public void onDestroy() {
        super.onDestroy();
        hidePDialog();
    }
 
    private void hidePDialog() {
        if (pDialog != null) {
            pDialog.dismiss();
            pDialog = null;
        }
    }
 
       
        
        
        
    
    
 
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_home, container, false);
 
        
        
        
        
 
        // Inflate the layout for this fragment
        return rootView;
    }
 
    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
    }
 
    @Override
    public void onDetach() {
        super.onDetach();
    }
}

[/code]

 

Hiç hata gözükmüyor fakat galiba fragment yapısını çok bilmediğimden eclipse'in bazı yanlış önerilerine tıkladım ve hata kalmadı :D Uygulama açıldığında hiç bir şey olmuyor boş fragment geliyor.

uygulamanın kaynak dosyaları ekte inceleyip yardımcı olursanız sevinirim : 

 

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

Android Json Parse Türkçe Karakter sorunu

Arkadaşlar

Android'te Json Parse işlemini yapıyorum fakat Türkçe karakter kullanınca o karakterler bozuk çıkıyor. Json dosyasını UTF-8 olarak değiştirince de bu seferde uygulamada jsondan bilgileri çekmiyor.

NeizlesemActivity

[code] JSONObject obj = response.getJSONObject(i);
                                Movie movie = new Movie();
                                movie.setTitle(obj.getString("title"));
                                movie.setThumbnailUrl(obj.getString("image"));
                                movie.setRating(((Number) obj.get("rating"))
                                        .doubleValue());
                                movie.setYear(obj.getInt("releaseYear"));[/code]

CustomListAdpter

[code]// title
        try {
            title.setText(m.getTitle());
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }[/code]

 

Movie

[code] public String getTitle() throws UnsupportedEncodingException {
        title.getBytes("ISO-8859-1");
        return title;[/code]

 

Kodlarım bunlar. Json dosyasından title değerini alıyor bir stringe yazdırıyor ve o string'ten geri listview'deki item'a yazdırıyor. Fakat dediğim gibi json dosyası utf-8 değilken açılıyordu ama Türkçe karakterler bozuk çıkıyordu. Şimdi ise json dosyasını utf-8 yapıp çekmeye çalışınca da hiç göstermiyor- çekmiyor. Listview'e hiçbir veri gelmiyor. Lütfen yardımcı olun bilen varsa

 

 

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

Eclipse yeni projeyi değil eskisini veriyor Apk'sında

18 Haziran 2015 tarihinde cevaplandı

Export ederken apk'sını almak istediğiniz projeyi seçtiğinizden emin misiniz ? Bazen Run ederken de başka projeyi daha önce çalıştırmışsanız onu açmaya çalışıyor. Export ederken apk'sını almak istediğiniz uygulamanın seçili olduğundan emin olun.

Home Tuşunu Disable Etmek Yardım Edermisiniz :)

18 Nisan 2015 tarihinde cevaplandı

daha önce dediğin gibi bende uygulamada bulununa çıkış tuşundan işlem yaptırmak için back pressed'ı iptal etmem gerekiyordu ben çözümü dialog açtırarak çözmüştüm hem uygulamadaki çıkışa basınca "çıkmak istiyor musunuz diye soruyordu" hem de back tuşuna basıldığında soruyordu. senin işine yarar mı bilmem ama

Google Play ne kadar güvenilir?

13 Aralık 2014 tarihinde cevaplandı

Aynı dertten bende yandım telif vs. yüzünden bilmeden 3 kere askıya alındı yazısını gördüm hiç haberim bile yoktu 3.cüde hesabı kapattıklarından uygulamayı yükledikten sonra uyarı gönderip kapatmak yerine direk yasalara uymuyorsa hiç kabul etmemesi gerekiyor bana da bu mantıklı olanı. 

Ama artık bi konu da da hak veriyorum google'a çünkü google play store artık bir sürü gereksiz çöp uygulamayla dolu 25 doları veren herkes en basit uygulamayı bile yüklüyor ve haliyle play store çöp uygulamalarla doluyor. 

İos'in app store'unda öyle bir şey yok ama neden çünkü orda 100 dolar geliştirici hesabı ve yıllık ücretlendiriyorsunuz haliyle oraya bir şeyler yükleyecek developer  gereksiz uygulamalarla çıkmıyor kullanıcı karşısına en iyisini yapıp en yükseğinden de fiyat koyup satıyor app store'da bence genel neden bu ama sizin projeniz orjinalse bilemem :)

Kitaplık görünümünde bir ListView nasıl oluşturulur ?

Bence bu şekilde bir görünüm elde edilmesi background sayesinde olmuş gibi ona göre de özelliştirilmiş ve yerleştirilmiş bir listview oluşturulmuş diye düşünüyorum.

RSS Çekilen veriyi uygulama içerisinde açma

12 Temmuz 2014 tarihinde cevaplandı

Tam olarak istediğim o değildi yalnız şöyle açıklayayım ben : Şimdi rss'le çektikten sonra listeliyor ya orda listedekilerden birine tıklayınca normalde telefonun tarayıcısında açıyor benim istediğim uygulama içerisindeki webview'de açması yani xmlLink'i alıp bir değişkene yazıdırıp o değişkenide webview.loadUrl'de kullanmak istiyorum

[code]String item = xmlLink.get(position);
             Uri.parse(item);
             Intent i = new Intent(DualarActivity.this,WebActivity.class);
             i.putExtra(Degiskenler.linkd, item);
            startActivity(i);[/code]

 

kodlarım bunlar : 

WebViewActivity :[code]w1=(WebView)findViewById(R.id.webView1);
        w1.loadUrl(getIntent().getStringExtra("linkd"));[/code]

 

Değişkenler.java : [code]

package com.cumakesici.dualar;

public class Degiskenler {

    public static final String linkd="";
}

[/code]