Skip to content
Permalink
Browse files

Auto-update

  • Loading branch information...
google-automerger committed Dec 5, 2014
1 parent 92c9f30 commit 8fcddbb2ce01d710eb6135a7ed89d9e94614b9de
Showing with 66 additions and 16 deletions.
  1. +35 −0 CONTRIB.md
  2. +15 −0 NOTICE
  3. +16 −16 README.md
@@ -0,0 +1,35 @@
# How to become a contributor and submit your own code

## Contributor License Agreements

We'd love to accept your sample apps and patches! Before we can take them, we
have to jump a couple of legal hurdles.

Please fill out either the individual or corporate Contributor License Agreement (CLA).

* If you are an individual writing original source code and you're sure you
own the intellectual property, then you'll need to sign an [individual CLA]
(https://developers.google.com/open-source/cla/individual).
* If you work for a company that wants to allow you to contribute your work,
then you'll need to sign a [corporate CLA]
(https://developers.google.com/open-source/cla/corporate).

Follow either of the two links above to access the appropriate CLA and
instructions for how to sign and return it. Once we receive it, we'll be able to
accept your pull requests.

## Contributing A Patch

1. Submit an issue describing your proposed change to the repo in question.
1. The repo owner will respond to your issue promptly.
1. If your proposed change is accepted, and you haven't already done so, sign a
Contributor License Agreement (see details above).
1. Fork the desired repo, develop and test your code changes.
1. Ensure that your code adheres to the existing style in the sample to which
you are contributing. Refer to the
[Android Code Style Guide]
(https://source.android.com/source/code-style.html) for the
recommended coding standards for this organization.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request.

15 NOTICE
@@ -0,0 +1,15 @@
This sample uses the following software:

Copyright 2014 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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -2,30 +2,30 @@ Android DoneBar Sample
===================================

This sample shows how to create a custom view in the ActionBar to show a done button, using
2 alternative layouts. This is well suited for simple data entry activities, where the only
options for the user are to cancel or confirm the data changes.
2 alternative layouts. This is well suited for simple data entry activities, where the only
options for the user are to cancel or confirm the data changes.

Introduction
------------

API 11 introduced the [ActionBar][1] as a navigational UI element. In most cases, a custom view isn't required
or even recommended, as using a menu xml file is all that is needed to add action icons to it. However, it is
possible to use a custom view and it is useful in some cases.
or even recommended, as using a menu xml file is all that is needed to add action icons to it. However, it is
possible to use a custom view and it is useful in some cases.

This sample contains two activities with custom views in their action bar, each with a "done" button. These are
designed to be used with simple data entry screen where the only options for the user are to cancel or confirm
the changes.
This sample contains two activities with custom views in their action bar, each with a "done" button. These are
designed to be used with simple data entry screen where the only options for the user are to cancel or confirm
the changes.

1. Create a layout for the [ActionBar][2].
2. In the activity, before setting the content view, inflate the view using the LayoutInflater.
3. Use `getActionBar()` to get the ActionBar, and set the display options with `ActionBar.DISPLAY_SHOW_CUSTOM`.
4. Set the custom view by calling `setCustomView(customActionBarView, new ActionBar.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT))` on the ActionBar.
5. You can now set the content view of the Activity.
1. Create a layout for the [ActionBar][2].
2. In the activity, before setting the content view, inflate the view using the LayoutInflater.
3. Use `getActionBar()` to get the ActionBar, and set the display options with `ActionBar.DISPLAY_SHOW_CUSTOM`.
4. Set the custom view by calling `setCustomView(customActionBarView, new ActionBar.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT))` on the ActionBar.
5. You can now set the content view of the Activity.


[1]: http://developer.android.com/design/patterns/actionbar.html
[2]: http://developer.android.com/reference/android/app/ActionBar.html
[1]: http://developer.android.com/design/patterns/actionbar.html
[2]: http://developer.android.com/reference/android/app/ActionBar.html

Pre-requisites
--------------
@@ -37,7 +37,7 @@ Pre-requisites
Screenshots
-------------

<img src=screenshots/1-main.png height="400" alt="Screenshot"/> <img src=screenshots/2-done-bar.png height="400" alt="Screenshot"/> <img src=screenshots/3-done-button.png height="400" alt="Screenshot"/>
<img src="screenshots/1-main.png" height="400" alt="Screenshot"/> <img src="screenshots/2-done-bar.png" height="400" alt="Screenshot"/> <img src="screenshots/3-done-button.png" height="400" alt="Screenshot"/>

Getting Started
---------------

0 comments on commit 8fcddbb

Please sign in to comment.
You can’t perform that action at this time.