Skip to content

Instantly share code, notes, and snippets.

View salihyalcin's full-sized avatar
🎯
Focusing

Salih YALÇIN salihyalcin

🎯
Focusing
View GitHub Profile
public class NavigationDrawerListViewAdapter extends BaseAdapter {
private LayoutInflater mInflater;
public ArrayList<NavigationDrawerFragment.ListItem> myItems;
final int INVALID_ID = -1;
public Integer intSeekBarValue;
public NavigationDrawerListViewAdapter(Context activity, ArrayList<NavigationDrawerFragment.ListItem> layers) {
mInflater = (LayoutInflater) activity.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
myItems = layers;
@salihyalcin
salihyalcin / NavigationDrawerListViewAdapter
Created May 28, 2015 07:54
NavigationDrawerListViewAdapter
package test.cbsmobil.ibb;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;
@salihyalcin
salihyalcin / NavigationDrawer
Created May 28, 2015 07:08
NavigationDrawer
package test.cbsmobil.ibb;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
@salihyalcin
salihyalcin / DynamicListview
Created May 28, 2015 07:06
DynamicListview
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
float value = ((float)progress/100);
comm.respond(value);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@salihyalcin
salihyalcin / FragmentFirst.java
Created February 18, 2015 16:29
InterFragment Communication
package example.fragmentcommu;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;