This file contains hidden or 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
try { | |
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.header); | |
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() { | |
@SuppressWarnings("ResourceType") | |
@Override | |
public void onGenerated(Palette palette) { | |
int vibrantColor = palette.getVibrantColor(R.color.primary_500); | |
int vibrantDarkColor = palette.getDarkVibrantColor(R.color.primary_700); | |
collapsingToolbarLayout.setContentScrimColor(vibrantColor); |
This file contains hidden or 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
private static class ViewPagerAdapter extends FragmentPagerAdapter { | |
private final List<Fragment> mmFragmentTitleList FragmentList = new ArrayList<>(); | |
private final List<String> = new ArrayList<>(); | |
public ViewPagerAdapter(FragmentManager manager) { | |
super(manager); | |
} | |
@Override | |
public Fragment getItem(int position) { |
This file contains hidden or 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 static class DummyFragment extends Fragment { | |
int color; | |
public DummyFragment() { | |
} | |
@SuppressLint("ValidFragment") | |
public DummyFragment(int color) { | |
this.color = color; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/htab_maincontent" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true"> | |
<android.support.design.widget.AppBarLayout |
This file contains hidden or 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 AnimateToolbar extends AppCompatActivity { | |
private CollapsingToolbarLayout collapsingToolbar; | |
private AppBarLayout appBarLayout; | |
private RecyclerView recyclerView; | |
private DessertAdapter dessertAdapter; | |
private Menu collapsedMenu; | |
private boolean appBarExpanded = true; |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true"> | |
<android.support.design.widget.AppBarLayout |
This file contains hidden or 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
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Privacy Policy</title> <style>body{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:1em;}</style></head> <body><h2>Privacy Policy</h2> <p> Suleiman Ali Shakir built the Wifi Buddy: Live Monitor app as an Ad Supported app. This SERVICE is provided by Suleiman Ali Shakir at no cost and is intended for use as is. </p> <p>This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. </p> <p>If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. </p> <p>The terms used in this Privacy Policy have the same meanings as in our Terms and Cond |
This file contains hidden or 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 abstract class PaginationScrollListener extends RecyclerView.OnScrollListener { | |
LinearLayoutManager layoutManager; | |
public PaginationScrollListener(LinearLayoutManager layoutManager) { | |
this.layoutManager = layoutManager; | |
} | |
@Override | |
public void onScrolled(RecyclerView recyclerView, int dx, int dy) { |
This file contains hidden or 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 Header extends AbstractItem<Header, Header.ViewHolder> { | |
String title; | |
public Header(String title) { | |
this.title = title; | |
} | |
public String getTitle() { | |
return title; |
This file contains hidden or 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 static Bitmap DownloadImageBitmap(String url) { | |
Bitmap bm = null; | |
try { | |
URL aURL = new URL(url); | |
URLConnection conn = aURL.openConnection(); | |
conn.connect(); | |
InputStream is = conn.getInputStream(); | |
BufferedInputStream bis = new BufferedInputStream(is); | |
bm = BitmapFactory.decodeStream(bis); | |
bis.close(); |
NewerOlder