Profile cover photo
Profile photo
adison huang
8 followers
8 followers
About
Communities and Collections
View all
Posts

Post has shared content
I had to implement a widget l call StateProgressBar(see attached images) for a recent android app. I have made the solution available to the android community.
I am currently looking for ways or tools to measure the performance of the library. Please can anyone suggest possible ways or tools available. Library available here : https://github.com/kofigyan/StateProgressBar
PhotoPhotoPhotoPhotoAnimated Photo
9/21/16
5 Photos - View album
Add a comment...

Post has shared content
ClassyShark (the Android APK inspector tool) just uploaded a new user #perfmatters
Add a comment...

Post has shared content
Add a comment...

Post has shared content
How to apply Model-View-Presenter Pattern on Android? How to save and restore the view state along screen orientation changes easily? How to handle background threads along screen orientation changes?  I have released a model-view-presenter library to solve that kind of problems and to build modern, robust, decoupled, reuseable and testable android apps : "Ted Mosby - Software Architect" http://hannesdorfmann.com/android/mosby 
Add a comment...

Post has attachment

Post has shared content
Your #Android  'res\layout' folder is too big? Try making sub-folders using resource merging #AndroidDev #Gradle   
Photo
Add a comment...

Post has shared content
Use colorPrimary to colorize your App Bar
Pro-tip by +Ian Lake 

The app bar [1], or action bar, is an iconic part of many Android apps, providing a consistent place for navigation affordances and frequent, important actions. But it can also be a great opportunity to bring some personality to your app. An easy way to do that is by using your branding color as the background of the app bar.

In fact, AppCompat makes this very straightforward using a technique of providing a color palette [2] for your app. While introduced in the Material themes added in Android 5.0, AppCompat makes this technique available to all Android 2.1+ devices.

If you’re using a theme such as Theme.AppCompat, you’d only need to add a colorPrimary attribute:
<style name="AppTheme" parent="@style/Theme.AppCompat">
<item name="colorPrimary">@color/primary</item>
</style>

And your App Bar will automatically be colored appropriately. You’ll note we’re using just colorPrimary and not android:colorPrimary as android:colorPrimary only works on Android 5.0 devices unlike the AppCompat provided colorPrimary. Just make sure you’re using the right theme so that the text and icons have enough contrast:
- Theme.AppCompat -> dark activity, dark app bar
- Theme.AppCompat.Light -> light activity, light app bar
- Theme.AppCompat.Light.DarkActionBar -> light activity, dark action bar

But perhaps you’ve already moved over to Toolbars (perhaps wrapped in the Design Library’s AppBarLayout [3])? In those cases, you’re probably using a Theme.AppCompat.NoActionBar or Theme.AppCompat.Light.NoActionBar theme and including those elements in your layout XML files. Thankfully, you can still take advantage of your colorPrimary using the format ?attr/colorPrimary:
<android.support.v7.widget.Toolbar
android:background="?attr/colorPrimary" />

This ?attr/ format allows you to pull any attribute out of your theme, making it easy to consolidate your theming into a single place and avoid finding/replacing across many files.

The other thing we’ve lost is our text coloring though - there’s no Theme.AppCompat.Light.DarkActionBar.NoActionBar. Here’s where a ThemeOverlay can prove incredibly helpful. ThemeOverlays, unlike a full theme, only seek to overlay the current theme, changing the few things they need to. For example, if we had a light theme but wanted a dark Toolbar, we could use:
<android.support.v7.widget.Toolbar
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
With just that change, our text and icons are now back to a white color - perfect for a dark Toolbar.

You’ll find a number of other colors you can and should add to your theme such as colorPrimaryDark for changing the status bar on 5.0+ devices to a darker branding color and colorAccent for a contrasting accent color designed to make elements such as a FloatingActionButton really pop out. If you’d want to learn more about AppCompat, check out our video on Consistent Design with AppCompat [4].

For now, bring some personality to your app by using colorPrimary to color your App Bar or Toolbar!

#BuildBetterApps

[1] - http://goo.gl/Meu1sE
[2] - https://goo.gl/EHaUMj
[3] - https://goo.gl/Wo1IBv
[4] - https://www.youtube.com/watch?v=5Be2mJzP-Uw
Add a comment...

Post has shared content

Post has shared content
We have implemented a helper library to assign "ViewModel" instances to each Fragment/Activity. These instances are not affected by screen orientation and they can even keep their state after application is killed due to low memory. So this is deeply connected with the Android lifecycle. Any thoughts? Please take a look at our implementation :-). (BTW. it's not a strict MVP, the ViewModel is the presenter and model, but we felt that this makes more sense in UI oriented Android applications).
Add a comment...

Post has shared content
Snazzy Overdraw visualizer for Android UI
Found this really nice tool here to show off how the overdraw on your app is working. Combining this, alongisde "Show GPU Overdraw" is a nice way to figure out the complexities of your appliaction.

#perfmatters
Add a comment...
Wait while more posts are being loaded