NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package emircivas.a_client;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;

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

/**
* Created by HS-Bireysel on 16.8.2017.
*/

public class Frag_Yazilar extends Fragment
{

View root;
ListView lv;
LayoutInflater li;
BaseAdapter ba;
JSONArray dS = new JSONArray();
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
root = inflater.inflate(R.layout.flag_basliklar, container, false);

final String baslik_id = getArguments().getString("id");
li = LayoutInflater.from(getActivity());
lv=(ListView)root.findViewById(R.id.lv);

new ASYNC(new ITask() {
@Override
public Context getContext() {
return getActivity();
}

@Override
public Object doInBG(String... params) throws Exception {
return Request.getArray("entryler","baslik_id",baslik_id);
}

@Override
public void onPost(Object result) throws Exception {
Log.e("x","RAW : "+result.toString());
dS = (JSONArray) result;
Log.e("x","Count : "+dS.length() + dS.toString());

lv.setAdapter(ba);
}
});

ba = new BaseAdapter()
{
public int getCount() { return dS.length(); }

public Object getItem(int i) { return null; }

public long getItemId(int i) { return 0; }

public View getView(int i, View view, ViewGroup viewGroup)
{
if (view == null) view = li.inflate(R.layout.customlistview, null);

TextView tvBaslik = (TextView) view.findViewById(R.id.baslik);
TextView tvTarih= (TextView) view.findViewById(R.id.tarih);
//Log.e("x","Views : "+tvBaslik.toString()+tvTarih.toString());
try {
JSONObject jo = dS.getJSONObject(i);
tvBaslik.setText(jo.getString("icerik"));
tvTarih.setText(jo.getString("yazar"));
} catch (Exception e) { e.toString();}
//Log.e("x","RAW : "+dS.length());
return view;
}
};



return root;
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.