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
compile 'com.google.code.gson:gson:2.6.2' | |
compile 'com.squareup.retrofit2:retrofit:2.0.2' | |
compile 'com.squareup.retrofit2:converter-gson:2.0.2' | |
public class ApiClient { | |
public static final String BASE_URL = "http://indianvedicschool.com/"; | |
private static Retrofit retrofit = null; | |
public static Retrofit getClient() { | |
if (retrofit==null) { |
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
public class LollipopBitmapMemoryCacheParamsSupplier implements Supplier<MemoryCacheParams> { | |
private ActivityManager activityManager; | |
public LollipopBitmapMemoryCacheParamsSupplier(ActivityManager activityManager) { | |
this.activityManager = activityManager; | |
} | |
@Override | |
public MemoryCacheParams get() { |
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
public class AppsListActivity extends Activity { | |
private PackageManager manager; | |
private ArrayList<AppDetail> apps; | |
private ListView list; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_apps_list); |
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
public class MainActivity extends AppCompatActivity{ | |
SectionsPagerAdapter mSectionsPagerAdapter; | |
static SessioManager session; | |
ViewPager mViewPager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); | |
// Set up the ViewPager with the sections adapter. | |
mViewPager = (ViewPager) findViewById(R.id.pager); |
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
//Give Your PackageName Ex:com.companyname.projectname; | |
package com.pgeek.sample; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
public class ConnectionDetector { | |
private Context _context; |
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
import java.util.*; | |
public class Sample{ | |
public static void main(String[] args){ | |
System.out.println("Hello world "); | |
} | |
} |
NewerOlder