-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Google libraries were updated as well
- Loading branch information
Showing
8 changed files
with
341 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 54 additions & 52 deletions
106
...om/tavsify/berkantkz/klu/KLU_Adapter.java → .../io/github/berkantkz/klu/KLU_Adapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,54 @@ | ||
package com.tavsify.berkantkz.klu; | ||
|
||
import android.content.Context; | ||
import android.support.annotation.NonNull; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.TextView; | ||
|
||
import java.util.ArrayList; | ||
|
||
/** | ||
* Created by Bilgisayar on 14.10.2017. | ||
*/ | ||
|
||
class KLU_Adapter extends ArrayAdapter<KLU_List>{ | ||
private ArrayList<KLU_List> klist; | ||
private LayoutInflater vi; | ||
private int Resource; | ||
|
||
KLU_Adapter(Context context, int resource, ArrayList<KLU_List> objects) { | ||
super(context, resource, objects); | ||
vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); | ||
Resource = resource; | ||
klist = objects; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public View getView(int position, View convertView, @NonNull ViewGroup parent) { | ||
// convert view = design | ||
View v = convertView; | ||
ViewHolder holder; | ||
if (v == null) { | ||
holder = new ViewHolder(); | ||
v = vi.inflate(Resource, null); | ||
holder.start = (TextView) v.findViewById(R.id.start); | ||
v.setTag(holder); | ||
} else { | ||
holder = (ViewHolder) v.getTag(); | ||
} | ||
|
||
holder.start.setText(klist.get(position).getStart().replace("00:00:00", "").replace("00:00:00","").replace("-01-"," Ocak ").replace("-02-", " Şubat ").replace("-03-"," Mart ").replace("-04-", " Nisan ").replace("-05-", " Mayıs ").replace("-06-"," Haziran ").replace("-07-", " Temmuz ").replace("-08-", " Ağustos ").replace("-09-", " Eylül ").replace("-10-" ," Ekim ").replace("-11-", " Kasım ").replace("-12-", " Aralık ").toUpperCase() + " " + klist.get(position).getTitle()); | ||
|
||
return v; | ||
} | ||
|
||
private static class ViewHolder { | ||
TextView start; | ||
} | ||
} | ||
package io.github.berkantkz.klu; | ||
|
||
import android.content.Context; | ||
import android.support.annotation.NonNull; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.TextView; | ||
|
||
import io.github.berkantkz.klu.R; | ||
|
||
import java.util.ArrayList; | ||
|
||
/** | ||
* Created by Bilgisayar on 14.10.2017. | ||
*/ | ||
|
||
class KLU_Adapter extends ArrayAdapter<KLU_List>{ | ||
private ArrayList<KLU_List> klist; | ||
private LayoutInflater vi; | ||
private int Resource; | ||
|
||
KLU_Adapter(Context context, int resource, ArrayList<KLU_List> objects) { | ||
super(context, resource, objects); | ||
vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); | ||
Resource = resource; | ||
klist = objects; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public View getView(int position, View convertView, @NonNull ViewGroup parent) { | ||
// convert view = design | ||
View v = convertView; | ||
ViewHolder holder; | ||
if (v == null) { | ||
holder = new ViewHolder(); | ||
v = vi.inflate(Resource, null); | ||
holder.start = (TextView) v.findViewById(R.id.start); | ||
v.setTag(holder); | ||
} else { | ||
holder = (ViewHolder) v.getTag(); | ||
} | ||
|
||
holder.start.setText(klist.get(position).getStart().replace("00:00:00", "").replace("00:00:00","").replace("-01-"," Ocak ").replace("-02-", " Şubat ").replace("-03-"," Mart ").replace("-04-", " Nisan ").replace("-05-", " Mayıs ").replace("-06-"," Haziran ").replace("-07-", " Temmuz ").replace("-08-", " Ağustos ").replace("-09-", " Eylül ").replace("-10-" ," Ekim ").replace("-11-", " Kasım ").replace("-12-", " Aralık ").toUpperCase() + " " + klist.get(position).getTitle()); | ||
|
||
return v; | ||
} | ||
|
||
private static class ViewHolder { | ||
TextView start; | ||
} | ||
} |
98 changes: 49 additions & 49 deletions
98
...a/com/tavsify/berkantkz/klu/KLU_List.java → ...ava/io/github/berkantkz/klu/KLU_List.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
package com.tavsify.berkantkz.klu; | ||
|
||
/** | ||
* Created by Bilgisayar on 14.10.2017. | ||
*/ | ||
|
||
public class KLU_List { | ||
private String id; | ||
private String title; | ||
private String aciklama; | ||
private String start; | ||
|
||
KLU_List() { | ||
|
||
} | ||
|
||
String getId() { | ||
return title; | ||
} | ||
|
||
void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
String getTitle() { | ||
return title; | ||
} | ||
|
||
void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
String getAciklama() { | ||
return aciklama; | ||
} | ||
|
||
void setAciklama(String aciklama) { | ||
this.aciklama = aciklama; | ||
} | ||
|
||
String getStart() { | ||
return start; | ||
} | ||
|
||
void setStart(String start) { | ||
this.start = start; | ||
} | ||
|
||
} | ||
package io.github.berkantkz.klu; | ||
|
||
/** | ||
* Created by Bilgisayar on 14.10.2017. | ||
*/ | ||
|
||
public class KLU_List { | ||
private String id; | ||
private String title; | ||
private String aciklama; | ||
private String start; | ||
|
||
KLU_List() { | ||
|
||
} | ||
|
||
String getId() { | ||
return title; | ||
} | ||
|
||
void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
String getTitle() { | ||
return title; | ||
} | ||
|
||
void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
String getAciklama() { | ||
return aciklama; | ||
} | ||
|
||
void setAciklama(String aciklama) { | ||
this.aciklama = aciklama; | ||
} | ||
|
||
String getStart() { | ||
return start; | ||
} | ||
|
||
void setStart(String start) { | ||
this.start = start; | ||
} | ||
|
||
} |
Oops, something went wrong.