Android view beyond the basic TextView, ImageView, ListView etc [closed] - android-view

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
so I have been learning Android Development and so far I have the basic idea of the Android Framework and proficient with Java so I have no trouble creating basic Applications
But so far, Im only so good as one would be with html+php in the WebDev world.
My question is, now what? Where should I look to create more feature rich apps? For example in webdevelopment, if I wanted a cool little callender widget, I can google jQuery callender and a get a lot of cool premade widgets. Similary, if I wanted something facy in android, where should I look at? Are there any resources out there which provide some cool things like this?
To be more clear, here is a page from the Android documentation on some of the design principles.
How would you create UI something like this:
Or some layout like this:
Or some drag and drop features with that white outline as the shadow like this
Or some dynamic layout like this
Are there any resources or websites which provides a guide to create things like these just like there are website show jQuery widgets in web development I've come across one site but this is only one... im pretty sure I am looking in the wrong location

Simple answer: you have to implement these design elements yourself by extending the View class or the subclasses such as TextView or ListView. After extending these, you add your own animations, characteristics, etc.
As you were asking for a link, here is one to the Creating a View Class website on Android Developers.
Complex views such as the contact list with pictures, text, notifications, animations, etc. can be combinations of multiple views and require a lot of coding but the above link is how they are made.
Best of luck! Don't let the SO guideline police stop you!

Related

How should I refactor my app correctly? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to create an app with ability for user to log in via Facebook, Twitter, Google, and LinkedIn. I'm using a single UIViewController and adding more and more code to viewDidLoad method. At this point my controller looks awful and I would like to split the code between associated classes (one for Facebook, and so on). I even thought about using custom views for every social media login button...
What would be the right thing to do?
There are at least two things to split in your case.
Login with different networks. It purely depends on your UI. You might have a separate view (and corresponding class) for each network or a popup.
Split code by applying an architectural pattern (MVC, MVVM, VIPER, etc.)
Here is a nice overview of them:
https://techblog.badoo.com/blog/2016/03/21/ios-architecture-patterns/
Additional change you should do is to introduce a separate bunch of classes to handle log in via social networks. Then in your view controller (or better in a View Model or somewhere else, depending on the design pattern you choose) you call SocialNetworkService.authenticateWithTwitter(email:password)
But remember, these classes have to know nothing about view controller.
I hope my answer gives you a hint in which direction to go.

Should I use Quartz2D to create a mind map interface? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Like this:
Can anybody give a hint? What are the APIs I need to use?
In terms of an interface, I'd suggest looking at a few things there:
1) Being (i you're acquainted to it) the Cocoa / UIKit interface
I know it sounds like an obvious place to refer to, but tire's a load of info here on the apple site that helps.
2) Look at the "Core Animation" side of things i.e. CALayer, CAShapeLayer (for shapes like squares etc..) and CATextLayer (for text). They deal directly with proper layer "laying out" of shapes, layers, animations and text.
3) In terms of a simper one (like one that appears like a "filesystem" structure or if you're a windows user a "windows folder structure), then I'd suggest NSSourceView or etc...
The options are pretty pretty much all over the place so the way you want to do it is all there, how you want it don't is all there, etc...
Hav you got any examples of what you've seem and need more clarification on?

Are Storyboards a good idea for apps that access the cloud? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm just about to delve into the world of app development (I'm usually a game developer) in iOS, and I've read the debates of using Storyboards Vs doing it programmatically, and I get for simple apps Storyboards is the way to go, but what about for Apps that access a server? and need to do lots of things dynamically? it seems most Apps these days would be like that, if that's the case are Storyboards a good idea in that situation?
You have to remember that Storyboards are not an alternative to code. They are a tool that can be used along with coded view, nibs, etc...
The real skill comes in using all of these in such a way that takes least effort and gives most maintainability, readability and reliability.
Many of my apps combine several storyboards and a lot of nibs.
Having said that. Nothing that can be done in a storyboard should be anywhere near any cloud code.
The classes that access the cloud should not change whether you are coding views using nibs or using storyboards.
The article that was linked in the other answer is very odd indeed. To dismiss storyboards as things that are only used for prototyping is just plain wrong.
A well structured app (or part of an app) that access some network stuff should be modelled something like...
[Networking stuff]----[View Controller Stuff]----[View Stuff]
It doesn't matter whether the view controller is created in a storyboard, nib or in code. The networking stuff is unchanged.
Also, the article mentions "custom views" as something that you can't do with Storyboards. Again, that's just wrong. My latest app Emojicate was written using a combination of Storyboards (the project has 2 storyboards), nibs (for custom cells etc...) and a couple of coded views (the emoji message view is coded).
It sounds like the guy writing that hasn't really looked into the various tools in any amount of detail.
Please take a look at the this article. I think it's summarised really nice and briefly the pros and cons:
http://andrewrauh.com/2013/09/01/storyboardsnibs-vs-doing-everything-with-code-in-ios/

How do you manage view tags in your iOS project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have an iOS app that uses a few viewcontrollers with lots of elements. I built the viewcontrollers in the interface builder (in a storyboard). For some key elements (loginbutton, important text, etc..) I created an IBOutlet to be able to use these elements in my code (adjust text/graphics mostly).
For some others where I just needed a quick fix (for example an activity indicator that I show and hide programmatically), I chose to not create an IBOutlet, but instead give them a tag number and access them by the viewWithTag:(NSInteger) method.
This seemed to work for me (it's only my second iOS project so it might be completely wrong to do this). But now that the viewcontrollers get more complex I find it hard to remember which numbers I already used for tags. Is there any way to keep track of this other than by going trough all the elements and checking their tag?
Maybe it's all wrong to use tags this way, in that case that's fine too. I could look them all up once and just create IBOutlets for all the cases where I use a tag now.
I would try to avoid using view tags as much as possible.
There are always other (and almost always better) ways to do exactly the same thing by using properties and data models instead of tags.
Here is an article that I found with some nice examples of why they're not a good idea to use... http://doing-it-wrong.mikeweller.com/2012/08/youre-doing-it-wrong-4-uiview.html
If you need to access a UI element then create an IBOutlet for it in the interface of the class that needs it.
Alternatively, if there are several elements that are the same then you can create and IBOutletCollection which is just an array that contains all the elements linked to it.
EDIT
For anyone stumbling across this now. This is an article from a former Apple engineer explaining why using tags is not only a code smell and bad practice but also a performance issue.
https://www.fadel.io/blog/posts/ios-performance-tips-you-probably-didnt-know/

How can I create a cloud backend to update my iOS app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a news application that i am in the process of building, and of course news updates a lot, so I have to constantly update my stories, so I need a backend of some sort that will let me update my stories over the air without updating the actual app.
I found Parse.com and they have some awesome stuff, but with the way my app is built I don't think I can use them.
I will have to update UIImageviews, UItextviews, and the names of Buttons. With Parse I can only seem to find help regarding the PFQueryTableViewController, which I could use this, but that requires completely recoding and some redesigning of my app to fit into that.
So unless there's another way, I guess I will suck it up and get to work.
So is there a simpler way to do this, or maybe a better service that works more towards what I'm describing?
What you are asking basically is how to do network communication. It sounds like to me you can do what you want with just Parse. You just store the images and text and then call the information from the parse backend when you are loading. From there you can update the UITextViews, button names, and UIImageViews however you want dynamically (using the .text, setTitle, and .image properties and methods respectively). You could also use Amazon S3 for image storage... but the API is less well documented for that.
This is probably your best bet, unless you really want to delve in more deeply and learn how to use NSURLConnection or AFNetworking to communicate with a back-end that you build on a django, ruby, etc. server that you host yourself on a server.

Resources