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.
Related
Is it possible to have ad-like pop-ups without using 3rd party JAR (like AdMob, etc) inside my own adnroid application?
The requirement is to show a banner (referencing to a link, the ad is related with the app itself) within the android application when connected to the internet.
Thank you for your help in advance! :D
To show ad like popup you either you can use any 3rd party library or you can do it with your self using webview. Here you do not want to use third party library, so I suggest you to use WebView. Whatever your link contains, just show it in banner, like Javascript, Html or Ad Image, you can show it in WebView which will looks like a banner. For this you have to do one thing only and it is, you have to design webview and its position looks like Ad banner. That's it.
In web-based development and Windows-based development it is possible to develop applets or components that other applications can embed in their own UI seamlessly. I have a component (derived from View) that does some real-time animation that I'd like other apps to be able to embed in their own views or activities. Is it possible to allow other apps to embed this component in them in such a way that, when my app is updated, the other apps will automatically exhibit the updated behavior in their embedded component?
If this is possible, I'm having a hard time figuring out the search terms to use to look up how to do this. How would one app go about embedding a view from another app, and what happens if that other app isn't installed?
You cannot directly allow embeding in the way of an iframe.
However, you could make your View a library project that other developers can include in their app, much like they include another company's SDK. To allow updating automatically, you will need to have your app installed in addition to theirs, and when making the library project, you will have to make a BroadcastReceiver that can react to broadcasts you send from your app to update the Views in other apps.
Your SDK can then receive these Broadcasts, and update your View accordingly.
You can make your current project as Library project. You add the Library project to the project you want use the custom View. Your custom View will be accessible in that project.
You can mark a project as Library project by going to Project Properties > Android and checking the appropriate checkbox.
You can create an app widget for your application, and that widget can be used by any application that acts as a widget host - which few do - but at least you could have it on your home screen. I wonder why this is not done more - that would be a killer feature for many applications.
https://developer.android.com/guide/topics/appwidgets/index.html
Gives more information.
I wrote an Android App using the Mixare (link to mixare project) Framework (for augmented reality).
The first step was to get the App running with my own data source. This was pretty simple since you simply have to create a new Intent for the mixare content like this:
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("http://myserver:8080/myData"), "application/mixare-json");
startActivity(i);
The problem is that this code simply makes a call to the mixare App on your Android device.
I want to modify the mixare view and integrate the whole source code into my App (it is licensed under GPLv3).
Do I have to use the mixare code as a library? What changes would I have to do to my AndroidManifest.xml for creating a new Intent?
I found out, that my question is not necessarily a mixare problem.
The Solution for integrating an Android app into another one is using the first one as a library.
For anyone who has not done this before this article helped me a lot. It explains how to integrate zxing barcode scanner into an Android app natively.
If you want to integrate mixare into your app then the whole app must be released under the GPLv3 license.
At the moment it's not possible for external plugins to alter the mixare view (i.e. using own icons or modifying the layout), but there are plans to do so, even though there are no estimates.
If you are interested I would suggest you propose your suggested approach to the developer discussion group.
HTH,
Daniele - mixare team
Due to lack of work & knowledge, I dont know the APIs by using which I can build Images gallery.
Please suggest the Servlet/JSP APIs to display Images Gallery like Facebook / Orkut.
Generally image galleries are done using JavaScript not using Java. Your Servlet/JSP api will provide links to your images and a JavaScript will be used to show them as gallery. Here is a ton of jQuery plugins(There are more for other libraries and some with out using any libraries) online.
In that case you shouldn't code it yourself :). Here you have an open source project called TriArctic which does just that :)
I know that Android's Youtube app is not open source, but I pulled apart the apk with apktool and found that they have a class, YoutubeListView used frequently in their app. Is there already an open source implementation of the Youtube Player Activity's title/ fling view/ layout? I know of similar views like Joao Machete's FlingAndScrollViewer, but I need it to be rigge to a title menu and work as smoothly as that on the Youtube app. If there is no open source implementation, either how hard would it be to convince Google to release just that component's source, or to implement it myself?
Thanks
Btw, the footer in this layout is what I am talking about. It has titles like Info & Related videos that can be clicked and it scrolls to them, and it can be scrolled left and right.
I've come to the conclusion that there is no such view. It would be best to make my own custom layout.