How do I go about implementing Android UI, specifically this gallery? - android

This question has 2 parts:
1) I'm new to Android development and find implementing the UI on Android quite overwhelming. It would be great help if you could point me to some free UI libraries or give me some advice on how mobile developers go about implementing the UI. Is there some framework of "standard" UI framework which I can use to build simple stuff that aren't directly possible from the Android API? I want to focus more on the content of the app rather than building all the quite common design patterns from scratch.
2) Currently, I'm building an app, which needs to have a gallery. I'm thinking of this
I want to supply a Vector of Photo (which contains URL to the thumbnail and the actual sized image) to this View and get something like that.
Thanks

That app is simply displaying the photos in a gridview. There are many libraries out there but Nostro's Universal Image Loader supports adding images from urls into gridview. Universal Image Loader

Related

Add markers to Panorama in Android

I already have an android app, It downloads a 360-degree panoramic image from the internet and displays inside the app using the PanoramaApi. This is all nice; I get the finger pan feature and the gyroscope based movement feature.
But I want more features. I want to be able to put markers inside the image and when clicked; I want to be able to move to a new Panoramic image inside the same viewer. Much like the live-in tour feature of CommonFloor. They also have the same feature in their Android App.
My goal is to create the same functionality.
What I have achieved so far is to display one panorama with PanoramaApi. Here is my effort so far on Github. My goal is to add markers and move from one panorama to another. And since I am currently displaying panorama using an Intent from the PanoramaAPI; I highly doubt that I will be able to add markers using this method.
There must be a better method for doing this.
I thought of using Unity, as Cardboard SDK for unity will also let me add Google Cardboard in future.
I don't want the user to install two separate APKs instead, I want the Unity to be embedded inside the current android app. It is documented here. One trick to display panorama images is documented here. However, I still have some problems with this.
How can I add markers to this?
If I add the markers somehow, how to embed that information within the panorama jpg file? (Can I do this without embedding the info as meta-data in the file, but instead saving that meta-data in a separate file (JSON/XMl or something else))?
How to pass the URLs for the panoramic jpegs and possible meta-data files, from the android activity to Unity?
I know about krpano, but it is for the web. I want a similar solution but for android.
Are there better libraries or SDKs that will enable me to achieve this? If not how can I communicate between Android and Unity?

Creating images for android

I'm currently creating an app for android that's going to need multiple images. Backgrounds, an image for the icon, and images for the buttons that I'll have. What's the best way to create an image for an android application and how would you implement them into the app so that they work? Any suggestion would be helpful. Thanks!
As a non-artist developer, creating production-quality images can be hard and probably best jobbed out to a graphics person. Partnering with a graphics/sound person can be a good solution.
For early development or other stuff that doesn't need to be production quality, I start with GIMP. Then for icons and buttons that need to be scalable, I use the free site Android Asset Studio to create 9-patch images.

Coverflow Carousel effect same as iPhone/iPad in android

Please see the below carousel image.
In this carousel iPhone developers are showing images from Web Url. We have to do the same but I tried much more on the web and other I didn't get the exact effect and smoothness like iPad Cover flow in android. And even In my cover flow images are not displaying fastly. So please can you suggest any solution regarding the same.
I made a coverflow widget from scratch. It doesn't use any deprecated components. You can find it here:
https://github.com/applm/ma-components
Edit: This implementation of coverflow is broken on newer android versions. I deprecated it. You can take a look at https://github.com/applm/CarouselWidget
Check out the 3D Carousel effects HERE. Carousel Component is very useful when you need to visualize list style data effectively like in the Music player or Gallery application. It provides a sample also.
You can check out the Demo also.

Create Android Client For Website

As a beginner wanting to become more familiar with the android platform, I wanted to create a web client for a website.
Something similar to https://play.google.com/store/apps/details?id=com.krinsen.javadocreader&hl=en
However, I am confused about how the author created the custom UI for the java docs.
To my understanding, there are 2 ways to do this.
One approach is with WebViews. I quickly prototyped a sample of this but I believe (correct me if I'm wrong) that I can't change the UI of the WebView and will have to view the page from the perspective of a browser. Unfortunately, this does not look very well as the website was not mobile optimized and there are inconsistent spacings and odd whitespace.
The second approach is to manually create each View using the different layouts provided by android (LinearLayout, TableLayout, etc). This should create a more custom mobile experience as I can manually construct how each page will look. However, this seems time-consuming as I will need to manually create a different UI page for each page of the website. Also I am confused as to how to pull the data from the website as each new view in the new UI will need the content from the website. Do I need to do HTML parsing to pull the content or is there a better way in the android sdk? What is a good approach that android developers take to extract the different forms of content from a website to redisplay on a android client?
Finally, since I have a very beginner understanding of this situation, am I correct in assuming that most likely the creator of the application mentioned above did something similar to the second approach I mentioned?
What is a good approach that android developers take to extract the different forms of content from a website to redisplay on a android client?
I think the best way is to provide an API for native application. Parsing HTML might look nice untill you need to suppport every change in your HTML page. But if you are not the owner of web-site there is no other choise if only you don't contact owners and ask for an API.

Is it useful using WebView whole layout in native Android app?

I am currently developing a native android app. My app has a lot of activities. I want to develop native android app. But in some case, I want to use a webview where the entire layout is just a webview. Not linear or relative or another layout, just a webview. All of the images and other things running in HTML. All of screen will run in HTML5.
So, I can partially transfer my app into iphone app or other platforms. This is the benefit of this way to me.
But I don't know. Is this way better? What will the performance be? What is the disadvantages of converting to an HTML5 app?
Can you explain?
There is a very good presentation about this very topic.
Performance: You are adding an additional layer in between, A webkit engine cannot always match native (and sometimes hardware accelerated) rendering performance.
Disadvantages: One is that the API use is limited, you can bind a page's JavaScript to Native code, but not all functionality is available.Though you might want to have a look at capabilities of Cordova project. Another is that emulating complex widgets via JavaScript will slow down the page.
Portability: Indeed is a great advantage, that's why PhoneGap and Cordova are popular. Though many like Facebook App etc have switched to native App for better performance.
The approach you require actually depends on your requirements. This may be my personal rant but IMHO: a markup can be only twisted so far, it can't out-perform industrial grade GUI programming setups as of yet.
Cons WebView
Can't use full performance of device, Since web view form an extra layer.
Web view can't listen all user event.
You can't fully share or save data from your web view to app.
Take more time to load. Other we get all things in a simple API and can be rendered.
Changing a simple fields in page need to load full page again.
Online required, can't extend offline features.
Orientation changes and full screen make difficulties.
Pros of using Web view
One page for both android and IOS.
I think the main advantage is the ability to make changes without the need for each user to update the app on his device, because all the pages are on your server.
No wait for app store approval for updation.
Some Techniques
Native elements TOGETHER with WebView. I think it will be much better, as there are a lot of functions that can't be done with WebView only. The combination of the two is much more recommended.
Rendering from locally, Create an assets directory for HTML files – Android internally maps it to file:///android_asset/ (note singular asset). So you can feed your web view form locally even if you are offline.
I think -by using this way- your app quality will be weak and app will be hard to use because the webview object not having a lot of tools that you can make it be compatible with android. e.g you can't share or save data from your webview to app. whatever that reference on your app what need and what dosen't need, by the way i tried to develop an app with html but it was bad.

Categories

Resources