Skip to content

Instantly share code, notes, and snippets.

View aytekin's full-sized avatar
🎯
Focusing

Aytekin Erlale aytekin

🎯
Focusing
View GitHub Profile
@LetItRock
LetItRock / RecyclerView.OnScrollListener.java
Last active June 9, 2022 03:42
Android RecyclerView detecting end of list
private boolean loading = true;
int pastVisiblesItems, visibleItemCount, totalItemCount;
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener()
{
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy)
{
if(dy > 0) //check for scroll down
{
@eirabben
eirabben / MainFragment.java
Created November 18, 2015 16:43
Android navigation drawer inside fragment.
public class MainFragment extends Fragment {
private DrawerLayout mDrawer;
private Toolbar mToolbar;
private ActionBarDrawerToggle mDrawerToggle;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@aladagemre
aladagemre / sehirler.html
Created November 10, 2014 17:50
Türkiye Şehir Listesi HTML Select Option
<select name="Sehir">
<option value="0">------</option>
<option value="1">Adana</option>
<option value="2">Adıyaman</option>
<option value="3">Afyonkarahisar</option>
<option value="4">Ağrı</option>
<option value="5">Amasya</option>
<option value="6">Ankara</option>
<option value="7">Antalya</option>
<option value="8">Artvin</option>
@burakerdem
burakerdem / turkey_cities_counties.sql
Created July 22, 2013 14:04
City and county list in Turkey with lat/lng.
DROP TABLE IF EXISTS `cities`;
CREATE TABLE `cities` (
`id` int(2) NOT NULL,
`title` varchar(255) NOT NULL,
`lat` double(11,8) DEFAULT NULL,
`lng` double(11,8) DEFAULT NULL,
`northeast_lat` double(11,8) DEFAULT NULL,
`northeast_lng` double(11,8) DEFAULT NULL,
`southwest_lat` double(11,8) DEFAULT NULL,
`southwest_lng` double(11,8) DEFAULT NULL,