RecyclerView prefetching in the latest support lib

RecyclerView prefetching in the latest support lib


RecyclerView prefetching in the latest support lib

Posted: 21 Dec 2016 04:22 PM PST

Design Like a Coder: Efficient Android Layouts with Dan Lew

Posted: 21 Dec 2016 08:32 AM PST

Speed up your project build time by Remote Build

Posted: 21 Dec 2016 07:12 AM PST

Fragmented podcast - 067: Cross platform development with Xamarin cofounder Joseph Hill

Posted: 21 Dec 2016 09:17 AM PST

Choosing a development laptop.

Posted: 21 Dec 2016 11:47 AM PST

Hey Everybody,

I was hoping someone could help better inform my laptop purchasing decision. I'm buying this laptop primarily for Android development. My current PC does OK at dev work but I need the portability of a laptop now. My budget max is about $2000 but I'd like to go slightly cheaper if possible.

Currently still learning, so mostly working with small projects, but hopefully within a year or so I'll be doing it professionally and working with larger projects.

When looking for a laptop that would be sufficient for painless Android development and general use, I've seen many recommendations for 16GB of RAM, and of course an SSD. My current machine has 8GB RAM and a hybrid drive, and while generally good can get a little slow with AS, especially with emulators which are so slow that I don't even bother with them. I assume the hybrid drive is the major bottleneck, but RAM gets nearly maxed out too. Definitely so with the emulator running.

I've basically narrowed my options to either a Macbook Pro or the Dell XPS 13 Dev edition. I'd like to move away from Windows, personal preference. Unfortunately, the new MBPs (Late 2016) have been widely panned as a bad value, even if they are still good machines, price aside. This has led me to consider getting even an older refurbished MBP. So, a few questions:

1) Just to confirm I'm not misled, would you agree that 16GB is a sensible requirement for any laptop geared primarily for Android development at this point? Also, would you recommend an i7 or would an i5 be just fine?

2) If I were to opt for an refurbished MBP (13" Early 2015 specced with i7, 16GB RAM, 256GB SSD) will this be powerful enough to keep doing Android development comfortably for say, at least 2-3 years? Since I'm sure many of you develop on Early 2015 MBPs currently, how well does this run emulators?

*Additionally, this would be my first mac purchase ever, so if any experienced Apple owners have any input here as to whether this sounds like a good/bad idea, I'm all ears. The above specs can be had for about $1600 vs $1999-2200 on the current gen MBP. I wouldn't consider refurbished with anyone other than Apple, but I'm going to put my trust in their dependability here. On the other hand, maybe it's better to just dive in and get a new mac if it's likely to last longer? Thoughts appreciated.

3) The Dell XPS 13 Dev Edition (Ubuntu) has caught my attention as well. The only configuration available with 16GB RAM is an i7, 16GB RAM, and 512GB SSD. Which is $1799 / $1950~ after tax. I like the machine over all, but if I'm going to be spending nearly $2k, then I kind of wonder why I'm not getting a Mac anyway. I've also seen widely reported issues with build quality and other annoyances, like coil whine issues.

TL;DR: If you had to buy a laptop for Android development right now, what specs would you require it to have? If you had to choose a MBP vs XPS 13, what would you pick and why? Is it a bad idea to buy a refurbished MBP?

Thanks!

submitted by /u/StoicDuck
[link] [comments]

Living without Kotlin (on Android) [xpost r/Kotlin]

Posted: 21 Dec 2016 07:36 AM PST

Introducing the ExifInterface Support Library - Android Developers Blog

Posted: 21 Dec 2016 11:42 PM PST

Problem with over engineering interview tasks

Posted: 21 Dec 2016 07:47 AM PST

Hello.

I am young Android developer with 2+ years of experience. I have been trying to find on google any info about how to solve problem with over engineering interview tasks while still showing that i have knowledge in these topics, but i did not find anything worthwhile. So i am looking here for tips and advice.

Lately i have been learning about libraries and patterns to improve code of apps, because it was really tough to implement new features and fix bugs when my code was all over the place.

So after learning them i wanted to display my news skill in interviews tasks. But i failed both of them because of over engineering.

Interview at Company A: I needed to write app in 45 minutes on the computer which gets data from REST API and shows it in Recyclerview.

I failed it(did not make it in time), because i was trying to implement MVP, Repository pattern, RxJava, Dagger2, error handling, SOLID.

Interview at Company B: I was given 3 days to make app which gets data from REST API shows it in Recyclerview and handle errors gracefully. It was a bit more complicated because of the size and structure of the JSON response.

I failed it, because i used Dagger2 to inject almost everything - Retrofit client, presenters, linearLayoutManager for Recyclerview ,etc... And i did not write tests.

My strategy for future:

1) 45 minute inteview task:

  • Use Retrofit and Butterknife because it is faster to make app then without these libraries.
  • Create just 4 classes - API interface, Retrofit client provider, Activity and RecylerView Adapter. Do everything in onCreate, forget about SOLID and architecture patterns(MVP, Clean, Repository, etc...)
  • Because of lack of time, do not write tests or program in TDD.
  • If there are no tests, do not use Dagger2.
  • Because of simple REST API request, do not use RxJava.

2) 3 day interview task:

  • Use Retrofit and Butterknife because it will make code look better.
  • Do not use Clean architecture(http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/), because this is small app.
  • Do not use repository pattern(http://martinfowler.com/eaaCatalog/repository.html), because app doesn't use both REST API and SQLite Database.
  • Use MVP architecture to separate UI and business logic so it would be easier to write Unit and UI tests.
  • Use Dagger2 only if there are tests where you need to inject mock(e.g. injecting mock for http client or repository object).
  • Do not use RxJava, because there is no need to transform data using filter, map or chaining requests using flatmap.
  • Use only jUnit and Mockito for unit testing. Avoid Roboletric, because we do not want to have Android components in unit tests.
  • Use Espresso for UI tests.
  • Try to write in TDD to have code coverage as big as possible.
  • Make separate classes for utility methods and error handling.
  • Correct class(https://www.novoda.com/blog/better-class-naming/) and resource naming(http://jeroenmols.com/blog/2016/03/07/resourcenaming/)
  • Use SOLID to avoid code smell(https://blog.codinghorror.com/code-smells/)
    • Single responsibility principle - use this if class is too big.
    • Open/closed principle - use this to evade making new conditional for every new type of object, try to use generic or interface.
    • Liskov substitution principle - use this if there is inheritance
    • Interface segregation principle - use this if there are interfaces with a lot of methods(3+);
    • Dependency inversion principle - use this if there are objects with similar functionality which all could implement one interface(e.g. shape interface for calculating area).

My questions:

  • What do you think about my strategies? What should i add or change?
  • How can i demonstrate knowledge of libraries or architecture patterns if i want to avoid over engineering tasks? E.g. knowledge of RxJava library and Clean Architecture pattern.
  • Should i prepare live templates with boilerplate code of architecture patterns for 45min tasks? Or will this still count as over engineering?

P.S. English is not my native language, sorry if my post is hard to read.

Edit: injecting linearLayoutManager not linearLayout.

submitted by /u/Eldareon
[link] [comments]

Setting up the Android Emulator for speed – Google Developers

Posted: 21 Dec 2016 11:17 PM PST

Equivalent of AsyncDisplayKit for Android?

Posted: 21 Dec 2016 10:02 PM PST

AsyncDisplayKit is an open-source iOS library that focuses on doing layouts and rendering on a background thread. It incorporates a wide variety of other performance tweaks as well, but that's it's bread-and-butter. It can offer a massive performance boost by keeping the main thread free. Is there anything like it for Android?

http://asyncdisplaykit.org/

submitted by /u/nonofap111
[link] [comments]

Beginner android developer. Need help understanding application life cycle and android architecture.

Posted: 21 Dec 2016 07:24 PM PST

Good evening everyone. I am interested in android development and have a question that will help me and hopefully other newcomers with their understanding of android development in general. Before I ask my question I must give you a bit of my background. I am a recent college graduate in Computer Science. The programming languages that I can say that I understand and am possibly intermediate in using are C++, java, PHP, and HTML. I do not have any working experience aside from working as a Jr. Web Developer with my department. I have a genuine interest in android development as the class was removed from out curriculum (not enough students somehow). Aside from a genuine curiosity I may want to develop applications for my own monetary gains, whether for employment or for self sufficiency. Ether way I believe I will enjoy programming since I want to program for fun mostly.

So with a description of what I hope to gain from android development, I want to ask what is a somewhat concrete way to describe the life cycle that all, and if not all most, android apps go through? When I am writing code I like to think of what I am doing in an abstract and basic way so that I can organize my code and observe what is going on the best way possible for me. I also like to know why exactly I am doing what I am doing. So far I have found a few video tutorials online but they only scratch the surface. They only tell me what to do and not the why and the how things work nor what is going on when I do x. I choose tutorials over books because I learn by first doing something and secondly by visualizing what I am doing and how it works.

I have found a few diagrams, such as this and this, but they dont exactly explain how the components on them exactly interact or how they come together. So I want a different viewpoint from a more experienced developer. Any pointers guys?

Please also let me know if this is a good question or if its all over the place. Being able to ask sufficient questions are also a part of learning and executing things efficiently.

submitted by /u/BlackVale
[link] [comments]

Display dialog from any activity (network error callbacks (

Posted: 21 Dec 2016 05:29 PM PST

I need to display dialogs for network error handling (timeout, 404s, etc..) but It needs a reference to a context. Is there a way to be able to display the dialog from any activity and make this method reusable. E.g. I want to use it in my login activity and also home page activity, without needing to pass in a Context variable to every network call that I make

submitted by /u/androidloki
[link] [comments]

How does one modify SDK source code?

Posted: 21 Dec 2016 05:01 PM PST

Hi, has anyone tried to modify Android SDK (specifically Android's http implementation), similar to the code here - https://android.googlesource.com/platform/libcore/+/19aa40c81c48ff98ccc7272f2a3c41479b806376/luni/src/main/java/libcore/net/http/ I want to implement a slight modification to the HttpURLConnectionImpl.java class but it's showing many errors when trying to debug, and requires more and more files. What files are required for me to create my own inheritance of the class and debug it without outside dependencies?

submitted by /u/John1Keyor
[link] [comments]

Small utility to extract bitmap from Java Heap Dump (hprof) and saves them in PNG files.

Posted: 21 Dec 2016 04:43 AM PST

Cyborg Build

Posted: 21 Dec 2016 03:16 AM PST

Need help looking at an android to SQL web setup.

Posted: 21 Dec 2016 12:09 PM PST

I am in the beginning stages of working on a project for a local business near the college I am attending. I want to be able to set up an android app for this business so that they can take orders from customers on a phone or tablet and then have the information from this order stored in a database so that they could view it later.

I figure that SQL on the web would work best for this. I would like the database to be searchable so that an employee can look up a customer's name or phone number in this database.

I have experience programming for android and the web, but not a whole lot for SQL databases. I would like to get some ideas for the best way I could set up this app and system.

Like I said, I think that SQL would be the best way to store this data and have a web page that employees could easily view this info on would help as well.

If you have any suggestions on what I should do, or any resources you think that would apply to my situation, I'm all ears!

submitted by /u/Blackbird_Singing
[link] [comments]

Looking for help with a project

Posted: 21 Dec 2016 11:56 AM PST

I'm trying to write an Android app that will scan a barcode, query a database, and display the price of the item. Unfortunately I've never made an Android app before, and I've never written a Java program that could query a database or scan a barcode. Does anyone know where I should start with this? Material I should read, examples to look at, or tutorials to watch would be very helpful.

submitted by /u/senorrawr
[link] [comments]

Choosing Material Design Colors

Posted: 21 Dec 2016 03:25 AM PST

Does anyone know if there are any resources out there that could help me filter out what accent colors go with each primary color in the Material Design color guidelines? https://material.io/guidelines/style/color.html.

I'm creating a tool that shows me what accent colours to choose from once I've selected a primary one.

submitted by /u/pxlshpr
[link] [comments]
Thanks for reading my news about RecyclerView prefetching in the latest support lib at my blog Custom Droid Rom if you want too share this article, please put the resource, and if you think this article is very usefully dont forget to bookmark this site with CTRL + D on your keyboard to web browser.

New and Hot Article's :

Note: only a member of this blog may post a comment.