Is it possible to use Glide with the AppIntro library? - java

I am using the AppIntro library for an app in Android and I want to download the images from my Firebase Storage, I am familiar with Glide and I have actually used it. The problem is that I haven't found any solution on how to access the ImageView so that I can use the into() function from Glide, and I haven't found a way to get the picture as a Drawable resource.

Yes it is possible .... But you will need to implement your firebase functionality within Fragments.
You can set your own fragments in APP INTRO LIBRARY with your own
views and functionalities.

Related

How to permanently cache data (Images) loaded?

My app loads and display thumbnails of top movies from a server via API. I don't want to query server and reload it every-time, I use glide to display images from server url.
How do i implement this image caching so that app uses previously loaded data, even if its offline.
Is there any library or do i have to store the images using sqlite and retrieve it ?
Thank you
If you use Glide to load the images, there is an extremely simple one-liner to cache all images.
Simple add '.diskCacheStrategy(DiskCacheStrategy.SOURCE)' to your Glide loading, and it'll cache the image, and use it even if you're offline.
So it could look like this:
Glide.with(context)
.load(imageUrl)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(target);
You should take a look at the introduction to Glide, on their official github repo. It mentions a lot of details about how it works.

How to set image placeholder like Instagram

I heard Instagram uses the Picasso library for loading images, I was wondering if anyone can point how i can implement the image loading placeholder like Instagram, where a progress bar loads, in my app as i also use the Picasso library. Thanks.
Did you try Glide? It's very easy.
Glide.with(this).load("url")
.placeholder(R.drawable.xxx)
.into(imageView);

Asynchronous loading image from web to gridview in Android

I want to load images Asynchronously from web to my Gridview in place of bubdub image without blocking the UI.
I want the app icons get loaded from web.
you can use picaso library for that
use
write below line in your adapter
Picasso.with(context).load("Your web Utl").into(imageView);
this will not block ur ui
have a look at that http://square.github.io/picasso/
add picasso library to your project and add this code to your Adapter's Getview method where you are trying to add set ImageResource.
Picasso.with(context)
.load(imageUrl_some_static_link)
.placeholder(R.drawable.image_name_in_your_case_bubdub).into(your_imageview)
Hope this helps cheers

Android/Java - refresh activity like in gmail app

I don't really know how to name it. In android gmail app or google now, etc it's possible to refresh data by all content down and then release it. All data are refreshed, with nice animation.
I'm looking for solution how it's done and how can I do the same in my own application. Do you have any examples, tutorials etc? How to develop this kind of "pull to refhresh"?
[edit]
What is better - 3rd party lib or Android SDK functionality? I'm looking for look like closest to gmail app.
There is a SwipeToRefreshLayout in android which is used to to that.
https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
Here is one of the tutorials
http://antonioleiva.com/swiperefreshlayout/
Read below lib for refresh your page :
https://github.com/chrisbanes/Android-PullToRefresh
This lib support :-
ListView
ExpandableListView
GridView
WebView
ScrollView
HorizontalScrollView
ViewPager
There is a Pull to refresh library which is mostly used. It is very easy to implement. From here you can download it.
Pull To Refresh for Android
Just import the library into your IDE, and add it your project as a dependency. An example is also included form which you can get coding related help.

Using the camera inside an Android app

I want to create an Android app which uses a camera, but I don't want the app to redirect to the default camera app on the device.
I want a custom-made camera app specifically for the app. How do I implement it?
Here is a nice tutorial to accomplish it.
Camera Integration with Surface View
You can make your custom changes on the SurfaceView according to your requirements.
Look into this tutorial http://www.airpair.com/android/android-camera-surface-view-fragment
Link 2
you can use SurfaceView Fragment.
I used https://github.com/commonsguy/cwac-camera to get custom camera done.
The library #commonsware made, great library with great documentation and support.

Categories