Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
#Android and CI and Gradle (A How-To) | |
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
The Android platform is not one of them. | |
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
But fear not! It can be done! | |
Before we embark on our journey, you'll need a few things to run locally: |
/** | |
* Vertically center Bootstrap 3 modals so they aren't always stuck at the top | |
*/ | |
$(function() { | |
function reposition() { | |
var modal = $(this), | |
dialog = modal.find('.modal-dialog'); |
# | |
# Build configuration for Circle CI | |
# | |
general: | |
artifacts: | |
- /home/ubuntu/your-app-name/app/build/outputs/apk/ | |
machine: | |
environment: |
#Android and CI and Gradle (A How-To)
There are tech stacks in this world that make it dead simple to integrate a CI build system.
The Android platform is not one of them.
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.
But fear not! It can be done!
Before we embark on our journey, you'll need a few things to run locally:
Introduction
AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat
and Widget.AppCompat
namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button
. Sure, there's Widget.AppCompat.Light.ActionButton
, but that doesn't actually inherit from Widget.ActionButton
, which does not inherit from Widget.Button
, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton
strictly belongs in the ActionBar
.
So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.
Digging In
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
language: android | |
android: | |
components: | |
# Uncomment the lines below if you want to | |
# use the latest revision of Android SDK Tools | |
- platform-tools | |
- tools | |
# The BuildTools version used by your project | |
- build-tools-22.0.0 |
// status bar height | |
int statusBarHeight = 0; | |
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); | |
if (resourceId > 0) { | |
statusBarHeight = getResources().getDimensionPixelSize(resourceId); | |
} | |
// action bar height | |
int actionBarHeight = 0; | |
final TypedArray styledAttributes = getActivity().getTheme().obtainStyledAttributes( |