This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
| dependencies { | |
| compile 'com.android.support:appcompat-v7:21.+' | |
| compile 'com.wrapp.floatlabelededittext:library:0.0.5' | |
| } |
| Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
| All Clickable Views: | |
| ----------- | |
| * ripple effect (Lollipop only) -- "colorControlHighlight" | |
| Status Bar: | |
| ------------ | |
| * background (Lollipop only) - "colorPrimaryDark" |
| # | |
| # Build configuration for Circle CI | |
| # | |
| general: | |
| artifacts: | |
| - /home/ubuntu/your-app-name/app/build/outputs/apk/ | |
| machine: | |
| environment: |
This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
| Google finally realized the need of generating unique IDs for programmatically created views... | |
| From API level 17 and above, you can call | |
| View.generateViewId() | |
| Then use View.setId(int). | |
| In case you need it for targets lower than level 17, here is its internal implementation in View.java you can use directly in your project, put it in your util class or somewhere: |
| // your code | |
| apply from: "build-plugins/idea-gradle-sources.gradle" |
| /** | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015 Circle Internet Financial | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright (C) 2015 The Android Open Source Project | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="action_pause">#FF8F00</color> | |
| <color name="action_resume">#43A047</color> | |
| </resources> |
| /** | |
| * This class allows you to listen to when the user is entering the background (i.e. after a home button press, | |
| * or opening recent apps etc) and when the user resumes the application from the background. | |
| * | |
| * @author John McDonnell | |
| */ | |
| public class BetterActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks { | |
| private int mForegroundActivities; |