init commit

This commit is contained in:
Tommy Parnell
2014-03-11 01:02:21 -04:00
parent 5941bb78dd
commit 2483d136cc
1207 changed files with 713509 additions and 0 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,59 @@
With Google Play services, your app can take advantage of the latest, Google-powered features such as Maps, Google+, and more, with automatic platform updates distributed as an APK through the Google Play store. This makes it faster for your users to receive updates and easier for you to integrate the newest that Google has to offer.
This component is only for Xamarin.Android applications that target Android 4.1.x (API level 16) and higher.
#### Google Technology
* Google Play services provides you with easy access to Google services and is tightly integrated with the Android OS. Easy-to-use client libraries are provided for each service that let you implement the functionality you want easier and faster.
#### Standard Authorization
* All products in Google Play services share a common authorization API that leverages the existing Google accounts on the device. You and your users have a consistent and safe way to grant and receive OAuth2 access tokens to Google services.
#### Automatic Updates
* Devices running Android 2.23 and newer and that have the Google Play Store app automatically receive updates to Google Play services. Enhance your app with the most recent version of Google Play services without worrying about your users' Android version.
Showing a Map
=============
This snippet shows how easy is to add a Map fragment to you app. **Additional setup is required please see** `GettingStarted` for more information.
### MainActivity.cs
```csharp
using Android.Gms.Maps;
// ...
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// add map fragment to frame layout
var mapFragment = new MapFragment ();
FragmentTransaction fragmentTx = this.FragmentManager.BeginTransaction();
fragmentTx.Add (Resource.Id.linearLayout1, mapFragment);
fragmentTx.Commit ();
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
}
```
How It Works
============
### The Google Play services client library
The client library contains the interfaces to the individual Google services and allows you to obtain authorization from users to gain access to these services with their credentials. It also contains APIs that allow you to resolve any issues at runtime, such as a missing, disabled, or out-of-date Google Play services APK. The client library has a light footprint, so it won't have an adverse impact on your app's file size.
If you want to access added features or products, you can upgrade to a new version of the client library as they are released. However, upgrading is not necessary if you don't care about new features or bug fixes. We anticipate more Google services to be continuously added, so be on the lookout for these updates.
### The Google Play services APK
The Google Play services APK contains the individual Google services and runs as a background service in the Android OS. You interact with the background service through the client library and the service carries out the actions on your behalf. An easy-to-use authorization flow is also provided to gain access to the each Google service, which provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play Store, so updates to the services are not dependent on carrier or OEM system image updates. In general, devices running Android 2.2 (Froyo) or later and have the Google Play Store app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem (devices older than Android 2.2 or devices without the Google Play Store app are not supported).
![The Google Play services APK on user devices receives regular updates for new APIs, features, and bug fixes.][1]
### The benefits for your app
Google Play services gives you the freedom to use the newest APIs for popular Google services without worrying about device support. Updates to Google Play services are distributed automatically by the Google Play Store and new versions of the client library are delivered through the Android SDK Manager. This makes it easy for you to focus on what's important: your users' experience.
[1]: http://developer.android.com/images/play-services-diagram.png

View File

@@ -0,0 +1,116 @@
Requirements
============
This component is only for applications that will target Android 4.1.x (API level 16) or higher.
It is not necessary to manually manage the version of the Google Play Services client libary via the Android SDK manager. The Google Play Services component embeds metadata to identify what version of the Google Services client library it is bound to. When you add the component to your application, the correct version of the Google Play Services client library is downloaded and the component automatically binds to that, instead of the version that is installed by the Android SDK Manager.
To **test** your app when using the **Google Play services SDK**, you must use either:
* A compatible Android device that runs Android 4.1 or higher and includes Google Play Store.
* The **Android emulator** with an AVD that runs the **Google APIs** platform based on **API level 19**.
Ideally, you should develop and test your app on a variety of devices, including both phones and tablets.
Google Maps v2 API Key
----------------------
You must [obtain a new API Key](https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key) for Google Maps v2, API keys from Google Maps v1 will not work.
The location of the debug.keystore file that Xamarin.Android uses depends on your platform:
- **Windows Vista / Windows 7 / Windows 8**: `C:\Users\[USERNAME]\AppData\Local\Xamarin\Mono for Android\debug.keystore`
- **OSX** : `/Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore`
To obtain the SHA1 fingerprint of the debug keystore, you can use the `keytool` command that is a part of the JDK. This is an example of using `keytool` at the command-line:
$ keytool -V -list -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android
Showing a Map
=============
### MainActivity.cs
```csharp
using Android.Gms.Maps;
// ...
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// add map fragment to frame layout
var mapFragment = new MapFragment ();
FragmentTransaction fragmentTx = this.FragmentManager.BeginTransaction();
fragmentTx.Add (Resource.Id.linearLayout1, mapFragment);
fragmentTx.Commit ();
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
}
```
### Adding the API Key to your application
It goes in your application's manifest, contained in the file AndroidManifest.xml. From there, the Maps API reads the key value and passes it to the Google Maps server, which then confirms that you have access to Google Maps data.
In `AndroidManifest.xml`, add the following element as a child of the `<application>` element, by inserting it just before the closing tag `</application>`
```xml
<application android:label="@string/app_name">
<!-- Put your Google Maps V2 API Key here. This key will not work for you.-->
<!-- See https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key -->
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YourKey" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
```
Add the following elements to your manifest. Replace `com.example.mapdemo` with the package name of your application.
```xml
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
```
### Specifying additional permissions
Besides permissions required by other parts of your application, you must add the following permissions to `AndroidManifest.xml` in order to use the Google Maps Android API:
```xml
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```
### Requiring OpenGL ES version 2
Because version 2 of the Google Maps Android API requires OpenGL ES version 2, you must add a `<uses-feature>` element as a child of the `<manifest>` element in `AndroidManifest.xml`
```xml
<!-- Google Maps for Android v2 requires OpenGL ES v2 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
```
Troubleshooting
===============
In order to fix `java.lang.OutOfMemoryError: Java heap space` you will need to increase the **JavaMaximunHeapSize**, in order to do this you must edit the .csproj (Your Project File) in a
XML/Text editor, and add
<PropertyGroup>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
</PropertyGroup>
* JavaMaximunHeapSize - This allows the overriding of the
default java heapsize which is sometimes too low to compile
some .jar files.

View File

@@ -0,0 +1,163 @@
Packages
- Google Play services, revision 7
License
Terms and Conditions
This is the Android Software Development Kit License Agreement.
1. Introduction
1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
2. Accepting this License Agreement
2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
3. SDK License from Google
3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.
3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
4. Use of the SDK by You
4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
5. Your Developer Credentials
5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
6. Privacy and Information
6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
7. Third Party Applications
7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
8. Using Android APIs
8.1 Google Data APIs
8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
9. Terminating this License Agreement
9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
9.3 Google may at any time, terminate this License Agreement with you if:
(A) you have breached any provision of this License Agreement; or
(B) Google is required to do so by law; or
(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
10. DISCLAIMER OF WARRANTIES
10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
11. LIMITATION OF LIABILITY
11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
12. Indemnification
12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
13. Changes to the License Agreement
13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
14. General Legal Terms
14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
November 13, 2012

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<component format="1" id="googleplayservicesjellybean">
<name>Google Play Services (JellyBean)</name>
<publisher>Xamarin Inc.</publisher>
<publisher-url>http://xamarin.com</publisher-url>
<version>15.0.1</version>
<summary>Give your apps more features to attract users on a wider range of devices.</summary>
<samples>
<sample id="MapsAndLocationDemo">
<name>Advanced Sample</name>
<summary>Advanced Sample</summary>
</sample>
<sample id="GooglePlayServicesApp">
<name>Simple Sample</name>
<summary>Simple Sample</summary>
</sample>
</samples>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

View File

@@ -0,0 +1,278 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

View File

@@ -0,0 +1,20 @@
Copyright (c) 2011 John Resig, http://jquery.com/
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 furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,200 @@
/* =============================================================================
Columns
========================================================================== */
/* Applied to body to debug layout alignments
.grid {
width:100%;
height:100%;
background:url(../images/grid.png) center repeat-y;
top:0px;
margin:auto;
position:absolute;
}
*/
@media screen, projection, print {
.full {
padding: 2.5em 0;
border-top: solid 1px #ddd;
border-bottom: solid 1px #ddd;
background: #f7f7f7;
}
.wrap {
margin: 0 auto;
width: 100%;
min-width:600px;
clear: both;
}
.cols {
height: 1%;
margin: 0 -1.533742331288343558282%;
width: 103.06748466257669%}
*+html .cols {
margin-bottom: 20px;
}
.cols:after {
clear: both;
content: ' ';
display: block;
height: 0;
visibility: hidden;
}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-13, .col-14, .col-15, .col-16 {
float: left;
margin: 0 1.063829787234% 20px 1.063829787234%;
}
* html .col-1, * html .col-2, * html .col-3, * html .col-4, * html .col-5, * html .col-6, * html
.col-7, * html .col-8, * html .col-9, * html .col-10, * html .col-11, * html .col-12, * html
.col-13, * html .col-14, * html .col-15, * html .col-16 {
margin: 0;
margin: 0 1.063829787234% 20px 1.063829787234%;
}
[dir='rtl'] .col-1, [dir='rtl'] .col-2, [dir='rtl'] .col-3, [dir='rtl'] .col-4, [dir='rtl'] .col-5,
[dir='rtl'] .col-6, [dir='rtl'] .col-7, [dir='rtl'] .col-8, [dir='rtl'] .col-9, [dir='rtl'] .col-10,
[dir='rtl'] .col-11, [dir='rtl'] .col-12 {
float: right;
}
.col-1 {
width: 4.16666666666667%;
}
.col-2 {
width: 10.4166666666667%;
}
.col-3 {
width: 16.6666666666667%;
}
.col-4 {
width: 22.9166666666667%;
}
.col-5 {
width: 29.1666666666667%;
}
.col-6 {
width: 35.4166666666667%;
}
.col-7 {
width: 41.6666666666667%;
}
.col-8 {
width: 47.9166666666667%;
}
.col-9 {
width: 55.3333333333333%;
}
.col-10 {
width: 60.4166666666667%;
}
.col-11 {
width: 66.6666666666667%;
}
.col-12 {
width: 72.9166666666667%;
}
.col-13 {
width: 79.1666666666667%;
}
.col-14 {
width: 85.4166666666667%;
}
.col-15 {
width: 91.6666666666667%;
}
.col-16 {
width: 97.9166666666667%;
}
#header .col-1,
#nav-x .col-1 { width: 40px }
#header .col-2,
#nav-x .col-2 { width: 100px }
#header .col-3,
#nav-x .col-3 { width: 160px }
#header .col-4,
#nav-x .col-4 { width: 220px }
#header .col-5,
#nav-x .col-5 { width: 280px }
#header .col-6,
#nav-x .col-6 { width: 340px }
#header .col-7,
#nav-x .col-7 { width: 400px }
#header .col-8,
#nav-x .col-8 { width: 460px }
#header .col-9,
#nav-x .col-9 { width: 520px }
#header .col-10,
#nav-x .col-10 { width: 580px }
#header .col-11,
#nav-x .col-11 { width: 640px }
#header .col-12,
#nav-x .col-12 { width: 700px }
#header .col-13,
#nav-x .col-13 { width: 760px }
#header .col-14,
#nav-x .col-14 { width: 820px }
#header .col-15,
#nav-x .col-15 { width: 880px }
#header .col-16,
#nav-x .col-16 { width: 940px }
body {
padding:0 20px;
}
#header,
#searchResults,
#nav-x {
margin:0;
}
#body-content {
margin:0;
}
#body-content > .col-12 {
width:77.9804965%;
margin:0 0 0 0.97%; /* this percentage chosen to make IE9 happy */
}
#side-nav {
width: 19.9804965%;
margin:0 1.063829787234% 0 0;
}
#header .wrap {
max-width: 100%;
}
#nav-x .wrap,
#searchResults.wrap {
max-width:100%;
}
.nav-x {
margin:-2px 0 0 0;
}
#devdoc-nav.fixed,
#devdoc-nav.fixed a.totop {
left:20px; /* !important ... for IE i think */
}
}
.col-right {
margin-right:0px;
}
@media screen and (max-width:772px) {
.col-5, .col-6, .col-7 {
clear: both;
width: 97.0238096%}
}

View File

@@ -0,0 +1,371 @@
/* content layout */
.resource-widget.resource-flow-layout {
display: inline-block;
margin-right: -20px;
/* clearfix idiom */ }
.resource-widget.resource-flow-layout.col-1 {
width: 60px; }
.resource-widget.resource-flow-layout.col-2 {
width: 120px; }
.resource-widget.resource-flow-layout.col-3 {
width: 180px; }
.resource-widget.resource-flow-layout.col-4 {
width: 240px; }
.resource-widget.resource-flow-layout.col-5 {
width: 300px; }
.resource-widget.resource-flow-layout.col-6 {
width: 360px; }
.resource-widget.resource-flow-layout.col-7 {
width: 420px; }
.resource-widget.resource-flow-layout.col-8 {
width: 480px; }
.resource-widget.resource-flow-layout.col-9 {
width: 540px; }
.resource-widget.resource-flow-layout.col-10 {
width: 600px; }
.resource-widget.resource-flow-layout.col-11 {
width: 660px; }
.resource-widget.resource-flow-layout.col-12 {
width: 720px; }
.resource-widget.resource-flow-layout.col-13 {
width: 780px; }
.resource-widget.resource-flow-layout.col-14 {
width: 840px; }
.resource-widget.resource-flow-layout.col-15 {
width: 900px; }
.resource-widget.resource-flow-layout.col-16 {
width: 960px; }
.resource-widget.resource-flow-layout:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden; }
* html .resource-widget.resource-flow-layout {
height: 1px; }
.resource-card {
/* stuff that applies to all cards */
display: -webkit-flex;
-webkit-transform: translateZ(0);
float: left;
position: relative;
margin-right: 20px;
margin-bottom: 20px;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
opacity: 0.8;
overflow: hidden;
transition: 0.4s box-shadow ease, 0.4s opacity ease;
/* card templates */
/* specific cards and customizations */ }
.resource-card .photo {
position: relative;
background-color: #eee;
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%; }
.resource-card.nophoto .photo:after {
content: '';
display: block;
position: absolute;
left: 20px;
top: 20px;
right: 20px;
bottom: 20px;
opacity: 0.2;
background-position: center center;
background-repeat: no-repeat;
background-size: contain; }
.resource-card .icon {
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
opacity: 0;
transition: 0.4s ease; }
.resource-card:hover .icon {
opacity: 0.2; }
.resource-card:hover {
opacity: 1;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5); }
.resource-card.resource-card-youtube.nophoto .photo:after, .resource-card.resource-card-youtube .icon {
background-image: url(../images/card_video.png); }
.resource-card.resource-card-samples.nophoto .photo:after, .resource-card.resource-card-samples .icon {
background-image: url(../images/card_sample.png); }
.resource-card.resource-card-blog.nophoto .photo:after, .resource-card.resource-card-blog .icon {
background-image: url(../images/card_post.png); }
.resource-card.resource-card-training.nophoto .photo:after, .resource-card.resource-card-training .icon {
background-image: url(../images/card_training.png); }
.resource-card .resource-card-text {
color: #333333; }
.resource-card .title {
/*font-weight: 700;*/
font-family: 'Roboto Condensed'; }
.resource-card .subtitle {
font-family: 'Roboto Condensed';
text-transform: uppercase;
opacity: 0.3; }
.resource-card .abstract {
font-weight: 300;
font-family: 'Roboto'; }
.resource-card.resource-card-12x7 {
width: 700px;
height: 400px;
-webkit-flex-direction: column; }
.resource-card.resource-card-12x7 .photo {
-webkit-flex: 1 1 auto;
border-bottom: 1px solid #ddd; }
.resource-card.resource-card-12x7 .resource-card-text {
margin: 20px;
padding-right: 88px; }
.resource-card.resource-card-12x7 .icon {
position: absolute;
right: 20px;
bottom: 20px;
width: 48px;
height: 48px; }
.resource-card.resource-card-12x7 .title {
font-size: 36px;
line-height: 35px;
max-height: 70px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; }
.resource-card.resource-card-12x7 .subtitle {
font-size: 18px;
line-height: 20px;
max-height: 20px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
max-height: 0;
margin-top: 0;
transition: 0.4s ease; }
.resource-card.resource-card-12x7:hover .subtitle {
margin-top: 10px;
max-height: 20px; }
.resource-card.resource-card-12x7 .abstract {
font-size: 18px;
margin-top: 0;
line-height: 25px;
max-height: 75px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
max-height: 0;
transition: 0.4s ease; }
.resource-card.resource-card-12x7:hover .abstract {
margin-top: 20px;
max-height: 75px; }
.resource-card.resource-card-8x6 {
width: 460px;
height: 340px;
-webkit-flex-direction: column; }
.resource-card.resource-card-8x6 .photo {
-webkit-flex: 1 1 auto;
border-bottom: 1px solid #ddd; }
.resource-card.resource-card-8x6 .resource-card-text {
margin: 20px;
padding-right: 88px; }
.resource-card.resource-card-8x6 .icon {
position: absolute;
right: 20px;
bottom: 20px;
width: 48px;
height: 48px; }
.resource-card.resource-card-8x6 .title {
font-size: 36px;
line-height: 35px;
max-height: 70px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; }
.resource-card.resource-card-8x6 .subtitle {
font-size: 18px;
line-height: 20px;
max-height: 20px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
max-height: 0;
margin-top: 0;
transition: 0.4s ease; }
.resource-card.resource-card-8x6:hover .subtitle {
margin-top: 10px;
max-height: 20px; }
.resource-card.resource-card-8x6 .abstract {
font-size: 18px;
margin-top: 0;
line-height: 25px;
max-height: 75px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
max-height: 0;
transition: 0.4s ease; }
.resource-card.resource-card-8x6:hover .abstract {
margin-top: 20px;
max-height: 75px; }
.resource-card.resource-card-8x6 .icon {
width: 32px;
height: 32px; }
.resource-card.resource-card-8x6 .title {
font-size: 24px;
line-height: 25px;
max-height: 50px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; }
.resource-card.resource-card-8x6 .abstract {
font-size: 16px;
margin-top: 10px;
line-height: 20px;
max-height: 60px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical; }
.resource-card.resource-card-8x6 .subtitle {
font-size: 16px;
line-height: 20px;
max-height: 20px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
max-height: 0;
margin-top: 0;
transition: 0.4s ease; }
.resource-card.resource-card-8x6:hover .subtitle {
margin-top: 10px;
max-height: 20px; }
.resource-card.resource-card-8x6 .abstract {
font-size: 16px;
margin-top: 0;
line-height: 20px;
max-height: 60px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
max-height: 0;
transition: 0.4s ease; }
.resource-card.resource-card-8x6:hover .abstract {
margin-top: 10px;
max-height: 60px; }
.resource-card.resource-card-6x4 {
width: 340px;
height: 220px;
-webkit-flex-direction: column; }
.resource-card.resource-card-6x4 .photo {
-webkit-flex: 1 1 auto;
border-bottom: 1px solid #ddd; }
.resource-card.resource-card-6x4 .resource-card-text {
margin: 10px;
padding-right: 26px; }
.resource-card.resource-card-6x4 .icon {
position: absolute;
right: 10px;
bottom: 10px;
width: 16px;
height: 16px; }
.resource-card.resource-card-6x4 .title {
font-size: 16px;
line-height: 20px;
max-height: 40px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; }
.resource-card.resource-card-6x4 .subtitle {
font-size: 13px;
line-height: 15px;
max-height: 30px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
max-height: 0;
margin-top: 0;
transition: 0.4s ease; }
.resource-card.resource-card-6x4:hover .subtitle {
max-height: 30px; }
.resource-card.resource-card-6x4 .abstract {
display: none; }
.resource-card.resource-card-6x4 .abstract {
font-size: 13px;
margin-top: 0;
line-height: 15px;
max-height: 30px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
max-height: 0;
display: block;
transition: 0.4s ease; }
.resource-card.resource-card-6x4:hover .abstract {
margin-top: 10px;
max-height: 30px; }
.resource-card.resource-card-4x3 {
width: 220px;
height: 160px;
-webkit-flex-direction: column; }
.resource-card.resource-card-4x3 .photo {
-webkit-flex: 1 1 auto;
border-bottom: 1px solid #ddd; }
.resource-card.resource-card-4x3 .resource-card-text {
margin: 10px;
padding-right: 26px; }
.resource-card.resource-card-4x3 .icon {
position: absolute;
right: 10px;
bottom: 10px;
width: 16px;
height: 16px; }
.resource-card.resource-card-4x3 .title {
font-size: 16px;
line-height: 20px;
max-height: 40px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; }
.resource-card.resource-card-4x3 .subtitle {
font-size: 13px;
line-height: 15px;
max-height: 30px;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
max-height: 0;
margin-top: 0;
transition: 0.4s ease; }
.resource-card.resource-card-4x3:hover .subtitle {
max-height: 30px; }
.resource-card.resource-card-4x3 .abstract {
display: none; }

View File

@@ -0,0 +1,7 @@
#header {
border-bottom: 3px solid #b6223c;
}
#search_filtered .jd-selected {
background-color:#b6223c;
}

View File

@@ -0,0 +1,188 @@
$(document).ready(function() {
// prep nav expandos
var pagePath = document.location.pathname;
if (pagePath.indexOf(SITE_ROOT) == 0) {
pagePath = pagePath.substr(SITE_ROOT.length);
if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') {
pagePath += 'index.html';
}
}
if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') {
// If running locally, SITE_ROOT will be a relative path, so account for that by
// finding the relative URL to this page. This will allow us to find links on the page
// leading back to this page.
var pathParts = pagePath.split('/');
var relativePagePathParts = [];
var upDirs = (SITE_ROOT.match(/(\.\.\/)+/) || [''])[0].length / 3;
for (var i = 0; i < upDirs; i++) {
relativePagePathParts.push('..');
}
for (var i = 0; i < upDirs; i++) {
relativePagePathParts.push(pathParts[pathParts.length - (upDirs - i) - 1]);
}
relativePagePathParts.push(pathParts[pathParts.length - 1]);
pagePath = relativePagePathParts.join('/');
} else {
// Otherwise the page path should be an absolute URL.
pagePath = SITE_ROOT + pagePath;
}
// select current page in sidenav and set up prev/next links if they exist
var $selNavLink = $('.nav-y').find('a[href="' + pagePath + '"]');
if ($selNavLink.length) {
$selListItem = $selNavLink.closest('li');
$selListItem.addClass('selected');
$selListItem.closest('li>ul').addClass('expanded');
// set up prev links
var $prevLink = [];
var $prevListItem = $selListItem.prev('li');
if ($prevListItem.length) {
if ($prevListItem.hasClass('nav-section')) {
// jump to last topic of previous section
$prevLink = $prevListItem.find('a:last');
} else {
// jump to previous topic in this section
$prevLink = $prevListItem.find('a:eq(0)');
}
} else {
// jump to this section's index page (if it exists)
$prevLink = $selListItem.parents('li').find('a');
}
if ($prevLink.length) {
var prevHref = $prevLink.attr('href');
if (prevHref == SITE_ROOT + 'index.html') {
// Don't show Previous when it leads to the homepage
$('.prev-page-link').hide();
} else {
$('.prev-page-link').attr('href', prevHref).show();
}
} else {
$('.prev-page-link').hide();
}
// set up next links
var $nextLink = [];
if ($selListItem.hasClass('nav-section')) {
// we're on an index page, jump to the first topic
$nextLink = $selListItem.find('ul').find('a:eq(0)')
} else {
// jump to the next topic in this section (if it exists)
$nextLink = $selListItem.next('li').find('a:eq(0)');
if (!$nextLink.length) {
// no more topics in this section, jump to the first topic in the next section
$nextLink = $selListItem.parents('li').next('li.nav-section').find('a:eq(0)');
}
}
if ($nextLink.length) {
$('.next-page-link').attr('href', $nextLink.attr('href')).show();
} else {
$('.next-page-link').hide();
}
}
// Set up expand/collapse behavior
$('.nav-y li').has('ul').click(function() {
if ($(this).hasClass('expanded')) {
return;
}
// hide other
var $old = $('.nav-y li.expanded');
if ($old.length) {
var $oldUl = $old.children('ul');
$oldUl.css('height', $oldUl.height() + 'px');
window.setTimeout(function() {
$oldUl
.addClass('animate-height')
.css('height', '');
}, 0);
$old.removeClass('expanded');
}
// show me
$(this).addClass('expanded');
var $ul = $(this).children('ul');
var expandedHeight = $ul.height();
$ul
.removeClass('animate-height')
.css('height', 0);
window.setTimeout(function() {
$ul
.addClass('animate-height')
.css('height', expandedHeight + 'px');
}, 0);
});
// Stop expand/collapse behavior when clicking on nav section links (since we're navigating away
// from the page)
$('.nav-y li').has('ul').find('a:eq(0)').click(function(evt) {
window.location.href = $(this).attr('href');
return false;
});
// Set up play-on-hover <video> tags.
$('video.play-on-hover').bind('click', function(){
$(this).get(0).load(); // in case the video isn't seekable
$(this).get(0).play();
});
// Set up tooltips
var TOOLTIP_MARGIN = 10;
$('acronym').each(function() {
var $target = $(this);
var $tooltip = $('<div>')
.addClass('tooltip-box')
.text($target.attr('title'))
.hide()
.appendTo('body');
$target.removeAttr('title');
$target.hover(function() {
// in
var targetRect = $target.offset();
targetRect.width = $target.width();
targetRect.height = $target.height();
$tooltip.css({
left: targetRect.left,
top: targetRect.top + targetRect.height + TOOLTIP_MARGIN
});
$tooltip.addClass('below');
$tooltip.show();
}, function() {
// out
$tooltip.hide();
});
});
// Set up <h2> deeplinks
$('h2').click(function() {
var id = $(this).attr('id');
if (id) {
document.location.hash = id;
}
});
// Set up fixed navbar
var navBarIsFixed = false;
$(window).scroll(function() {
var scrollTop = $(window).scrollTop();
var navBarShouldBeFixed = (scrollTop > (100 - 40));
if (navBarIsFixed != navBarShouldBeFixed) {
if (navBarShouldBeFixed) {
$('#nav')
.addClass('fixed')
.prependTo('#page-container');
} else {
$('#nav')
.removeClass('fixed')
.prependTo('#nav-container');
}
navBarIsFixed = navBarShouldBeFixed;
}
});
});

View File

@@ -0,0 +1,690 @@
/* file: doclava-developer-core.css
info: core developer styles
*/
/* RESET STYLES */
html,body,div,h1,h2,h3,h4,h5,h6,p,img,
dl,dt,dd,ol,ul,li,table,caption,tbody,
tfoot,thead,tr,th,td,form,fieldset,
embed,object,applet {
margin: 0;
padding: 0;
border: 0;
}
/* BASICS */
html, body {
overflow:hidden; /* keeps scrollbar off IE */
background-color:#fff;
}
body {
font-family:arial,sans-serif;
color:#000;
font-size:13px;
color:#333;
background-image:url(images/bg_fade.jpg);
background-repeat:repeat-x;
}
a, a code {
color:#006699;
}
a:active,
a:active code {
color:#f00;
}
a:visited,
a:visited code {
color:#006699;
}
input, select,
textarea, option, label {
font-family:inherit;
font-size:inherit;
padding:0;
margin:0;
vertical-align:middle;
}
option {
padding:0 4px;
}
p {
padding:0;
margin:0 0 1em;
}
code, pre {
color:#007000;
font-family:monospace;
line-height:1em;
}
var {
color:#007000;
font-style:italic;
}
pre {
border:1px solid #ccc;
background-color:#fafafa;
padding:10px;
margin:0 0 1em 1em;
overflow:auto;
line-height:inherit; /* fixes vertical scrolling in webkit */
}
h1,h2,h3,h4,h5 {
margin:1em 0;
padding:0;
}
p,ul,ol,dl,dd,dt,li {
line-height:1.3em;
}
ul,ol {
margin:0 0 .8em;
padding:0 0 0 2em;
}
li {
padding:0 0 .5em;
}
dl {
margin:0 0 1em 0;
padding:0;
}
dt {
margin:0;
padding:0;
}
dd {
margin:0 0 1em;
padding:0 0 0 2em;
}
li p {
margin:.5em 0 0;
}
dd p {
margin:1em 0 0;
}
li pre, li table, li img {
margin:.5em 0 0 1em;
}
dd pre,
#jd-content dd table,
#jd-content dd img {
margin:1em 0 0 1em;
}
li ul,
li ol,
dd ul,
dd ol {
margin:0;
padding: 0 0 0 2em;
}
li li,
dd li {
margin:0;
padding:.5em 0 0;
}
dl dl,
ol dl,
ul dl {
margin:0 0 1em;
padding:0;
}
table {
font-size:1em;
margin:0 0 1em;
padding:0;
border-collapse:collapse;
border-width:0;
empty-cells:show;
}
td,th {
border:1px solid #ccc;
padding:6px 12px;
text-align:left;
vertical-align:top;
background-color:inherit;
}
th {
background-color:#dee8f1;
}
td > p:last-child {
margin:0;
}
hr.blue {
background-color:#DDF0F2;
border:none;
height:5px;
margin:20px 0 10px;
}
blockquote {
margin: 0 0 1em 1em;
padding: 0 4em 0 1em;
border-left:2px solid #eee;
}
/* LAYOUT */
#body-content {
/* "Preliminary" watermark for draft documentation.
background:transparent url(images/preliminary.png) repeat scroll 0 0; */
margin:0;
position:relative;
width:100%;
}
#header {
height: 34px;
position:relative;
z-index:100;
min-width:675px; /* min width for the tabs, before they wrap */
padding:0 10px;
border-bottom:3px solid #94b922;
}
#headerLeft{
padding: 10px 0 0;
}
/*
#headerLeft img{
height:50px;
width:180px;
}
*/
#headerRight {
position:absolute;
right:0;
top:0;
text-align:right;
}
/* Tabs in the header */
#header ul {
list-style: none;
margin: 7px 0 0;
padding: 0;
height: 29px;
}
#header li {
float: left;
margin: 0px 2px 0px 0px;
padding:0;
}
#header li a {
text-decoration: none;
display: block;
background-image: url(images/bg_images_sprite.png);
background-position: 0 -58px;
background-repeat: no-repeat;
color: #666;
font-size: 13px;
font-weight: bold;
width: 94px;
height: 29px;
text-align: center;
margin: 0px;
}
#header li a:hover {
background-image: url(images/bg_images_sprite.png);
background-position: 0 -29px;
background-repeat: no-repeat;
}
#header li a span {
position:relative;
top:7px;
}
#header li a span+span {
display:none;
}
/* tab highlighting */
.home #home-link a,
.guide #guide-link a,
.reference #reference-link a,
.sdk #sdk-link a,
.resources #resources-link a,
.videos #videos-link a {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
background-repeat: no-repeat;
color: #fff;
font-weight: bold;
cursor:default;
}
.home #home-link a:hover,
.guide #guide-link a:hover,
.reference #reference-link a:hover,
.sdk #sdk-link a:hover,
.resources #resources-link a:hover,
.videos #videos-link a:hover {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
}
#headerLinks {
margin:10px 10px 0 0;
height:13px;
font-size: 11px;
vertical-align: top;
}
#headerLinks a {
color: #7FA9B5;
}
#headerLinks img {
vertical-align:middle;
}
#language {
margin:0 10px 0 4px;
}
#search {
height:45px;
margin:8px 10px 0 0;
}
/* MAIN BODY */
#mainBodyFluid {
margin: 20px 10px;
color:#333;
}
#mainBodyFixed {
margin: 20px 10px;
color: #333;
width:930px;
position:relative;
}
#mainBodyFixed h3,
#mainBodyFluid h3 {
color:#336666;
font-size:1.25em;
margin: 0em 0em 0em 0em;
padding-bottom:.5em;
}
#mainBodyFixed h2,
#mainBodyFluid h2 {
color:#336666;
font-size:1.25em;
margin: 0;
padding-bottom:.5em;
}
#mainBodyFixed h1,
#mainBodyFluid h1 {
color:#435A6E;
font-size:1.7em;
margin: 1em 0;
}
#mainBodyFixed .green,
#mainBodyFluid .green,
#jd-content .green {
color:#7BB026;
background-color:none;
}
#mainBodyLeft {
float: left;
width: 600px;
margin-right: 20px;
color: #333;
position:relative;
}
div.indent {
margin-left: 40px;
margin-right: 70px;
}
#mainBodyLeft p {
color: #333;
font-size: 13px;
}
#mainBodyLeft p.blue {
color: #669999;
}
#mainBodyLeft #communityDiv {
float: left;
background-image:url(images/bg_community_leftDiv.jpg);
background-repeat: no-repeat;
width: 581px;
height: 347px;
padding: 20px 0px 0px 20px;
}
#mainBodyRight {
float: left;
width: 300px;
color: #333;
}
#mainBodyRight p {
padding-right: 50px;
color: #333;
}
#mainBodyRight table {
width: 100%;
}
#mainBodyRight td {
border:0px solid #666;
padding:0px 5px;
text-align:left;
}
#mainBodyRight td p {
margin:0 0 1em 0;
}
#mainBodyRight .blueBorderBox {
border:5px solid #ddf0f2;
padding:18px 18px 18px 18px;
text-align:left;
}
#mainBodyFixed .seperator {
background-image:url(images/hr_gray_side.jpg);
background-repeat:no-repeat;
width: 100%;
float: left;
clear: both;
}
#mainBodyBottom {
float: left;
width: 100%;
clear:both;
color: #333;
}
#mainBodyBottom .seperator {
background-image:url(images/hr_gray_main.jpg);
background-repeat:no-repeat;
width: 100%;
float: left;
clear: both;
}
/* FOOTER */
#footer {
float: left;
width:90%;
margin: 20px;
color: #aaa;
font-size: 11px;
}
#footer a {
color: #aaa;
font-size: 11px;
}
#footer a:hover {
text-decoration: underline;
color:#aaa;
}
#footerlinks {
margin-top:2px;
}
#footerlinks a,
#footerlinks a:visited {
color:#006699;
}
/* SEARCH FILTER */
#search_autocomplete {
color:#aaa;
}
#search-button {
display:inline;
}
#search_filtered_div {
position:absolute;
margin-top:-1px;
z-index:101;
border:1px solid #BCCDF0;
background-color:#fff;
}
#search_filtered {
min-width:100%;
}
#search_filtered td{
background-color:#fff;
border-bottom: 1px solid #669999;
line-height:1.5em;
}
#search_filtered .jd-selected {
background-color: #94b922;
cursor:pointer;
}
#search_filtered .jd-selected,
#search_filtered .jd-selected a {
color:#fff;
}
.no-display {
display: none;
}
.jd-autocomplete {
font-family: Arial, sans-serif;
padding-left: 6px;
padding-right: 6px;
padding-top: 1px;
padding-bottom: 1px;
font-size: 0.81em;
border: none;
margin: 0;
line-height: 1.05em;
}
.show-row {
display: table-row;
}
.hide-row {
display: hidden;
}
/* SEARCH */
/* restrict global search form width */
#searchForm {
width:350px;
}
#searchTxt {
width:200px;
}
/* disable twiddle and size selectors for left column */
#leftSearchControl div {
width: 100%;
}
#leftSearchControl .gsc-twiddle {
background-image : none;
}
#leftSearchControl td, #searchForm td {
border: 0px solid #000;
}
#leftSearchControl .gsc-resultsHeader .gsc-title {
padding-left : 0px;
font-weight : bold;
font-size : 13px;
color:#006699;
display : none;
}
#leftSearchControl .gsc-resultsHeader div.gsc-results-selector {
display : none;
}
#leftSearchControl .gsc-resultsRoot {
padding-top : 6px;
}
#leftSearchControl div.gs-visibleUrl-long {
display : block;
color:#006699;
}
.gsc-webResult div.gs-visibleUrl-short,
table.gsc-branding,
.gsc-clear-button {
display : none;
}
.gsc-cursor-box .gsc-cursor div.gsc-cursor-page,
.gsc-cursor-box .gsc-trailing-more-results a.gsc-trailing-more-results,
#leftSearchControl a,
#leftSearchControl a b {
color:#006699;
}
.gsc-resultsHeader {
display: none;
}
/* Disable built in search forms */
.gsc-control form.gsc-search-box {
display : none;
}
table.gsc-search-box {
margin:6px 0 0 0;
border-collapse:collapse;
}
td.gsc-input {
padding:0 2px;
width:100%;
vertical-align:middle;
}
input.gsc-input {
border:1px solid #BCCDF0;
width:99%;
padding-left:2px;
font-size:.95em;
}
td.gsc-search-button {
text-align: right;
padding:0;
vertical-align:top;
}
#search-button {
margin:0 0 0 2px;
font-size:11px;
}
/* search result tabs */
#doc-content .gsc-control {
position:relative;
}
#doc-content .gsc-tabsArea {
position:relative;
white-space:nowrap;
}
#doc-content .gsc-tabHeader {
padding: 3px 6px;
position:relative;
}
#doc-content .gsc-tabHeader.gsc-tabhActive {
border-top: 2px solid #94B922;
}
#doc-content h2#searchTitle {
padding:0;
}
#doc-content .gsc-resultsbox-visible {
padding:1em 0 0 6px;
}
/* Pretty printing styles. Used with prettify.js. */
.str { color: #080; }
.kwd { color: #008; }
.com { color: #800; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
dl.tag-list dt code,
.tag { color: #008; }
dl.atn-list dt code,
.atn { color: #828; }
.atv { color: #080; }
.dec { color: #606; }
@media print {
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}

View File

@@ -0,0 +1,521 @@
var resizePackagesNav;
var classesNav;
var devdocNav;
var sidenav;
var content;
var HEADER_HEIGHT = -1;
var cookie_namespace = 'doclava_developer';
var NAV_PREF_TREE = "tree";
var NAV_PREF_PANELS = "panels";
var nav_pref;
var toRoot;
var isMobile = false; // true if mobile, so we can adjust some layout
var isIE6 = false; // true if IE6
// TODO: use $(document).ready instead
function addLoadEvent(newfun) {
var current = window.onload;
if (typeof window.onload != 'function') {
window.onload = newfun;
} else {
window.onload = function() {
current();
newfun();
}
}
}
var agent = navigator['userAgent'].toLowerCase();
// If a mobile phone, set flag and do mobile setup
if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
(agent.indexOf("blackberry") != -1) ||
(agent.indexOf("webos") != -1) ||
(agent.indexOf("mini") != -1)) { // opera mini browsers
isMobile = true;
addLoadEvent(mobileSetup);
// If not a mobile browser, set the onresize event for IE6, and others
} else if (agent.indexOf("msie 6") != -1) {
isIE6 = true;
addLoadEvent(function() {
window.onresize = resizeAll;
});
} else {
addLoadEvent(function() {
window.onresize = resizeHeight;
});
}
function mobileSetup() {
$("body").css({'overflow':'auto'});
$("html").css({'overflow':'auto'});
$("#body-content").css({'position':'relative', 'top':'0'});
$("#doc-content").css({'overflow':'visible', 'border-left':'3px solid #DDD'});
$("#side-nav").css({'padding':'0'});
$("#nav-tree").css({'overflow-y': 'auto'});
}
/* loads the lists.js file to the page.
Loading this in the head was slowing page load time */
addLoadEvent( function() {
var lists = document.createElement("script");
lists.setAttribute("type","text/javascript");
lists.setAttribute("src", toRoot+"reference/lists.js");
document.getElementsByTagName("head")[0].appendChild(lists);
} );
addLoadEvent( function() {
$("pre:not(.no-pretty-print)").addClass("prettyprint");
prettyPrint();
} );
function setToRoot(root) {
toRoot = root;
// note: toRoot also used by carousel.js
}
function restoreWidth(navWidth) {
var windowWidth = $(window).width() + "px";
content.css({marginLeft:parseInt(navWidth) + 6 + "px"}); //account for 6px-wide handle-bar
if (isIE6) {
content.css({width:parseInt(windowWidth) - parseInt(navWidth) - 6 + "px"}); // necessary in order for scrollbars to be visible
}
sidenav.css({width:navWidth});
resizePackagesNav.css({width:navWidth});
classesNav.css({width:navWidth});
$("#packages-nav").css({width:navWidth});
}
function restoreHeight(packageHeight) {
var windowHeight = ($(window).height() - HEADER_HEIGHT);
var swapperHeight = windowHeight - 13;
$("#swapper").css({height:swapperHeight + "px"});
sidenav.css({height:windowHeight + "px"});
content.css({height:windowHeight + "px"});
resizePackagesNav.css({maxHeight:swapperHeight + "px", height:packageHeight});
classesNav.css({height:swapperHeight - parseInt(packageHeight) + "px"});
$("#packages-nav").css({height:parseInt(packageHeight) - 6 + "px"}); //move 6px to give space for the resize handle
devdocNav.css({height:sidenav.css("height")});
$("#nav-tree").css({height:swapperHeight + "px"});
}
function readCookie(cookie) {
var myCookie = cookie_namespace+"_"+cookie+"=";
if (document.cookie) {
var index = document.cookie.indexOf(myCookie);
if (index != -1) {
var valStart = index + myCookie.length;
var valEnd = document.cookie.indexOf(";", valStart);
if (valEnd == -1) {
valEnd = document.cookie.length;
}
var val = document.cookie.substring(valStart, valEnd);
return val;
}
}
return 0;
}
function writeCookie(cookie, val, section, expiration) {
if (val==undefined) return;
section = section == null ? "_" : "_"+section+"_";
if (expiration == null) {
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
expiration = date.toGMTString();
}
document.cookie = cookie_namespace + section + cookie + "=" + val + "; expires=" + expiration+"; path=/";
}
function getSection() {
if (location.href.indexOf("/reference/") != -1) {
return "reference";
} else if (location.href.indexOf("/guide/") != -1) {
return "guide";
} else if (location.href.indexOf("/resources/") != -1) {
return "resources";
}
var basePath = getBaseUri(location.pathname);
return basePath.substring(1,basePath.indexOf("/",1));
}
function init() {
HEADER_HEIGHT = $("#header").height()+3;
$("#side-nav").css({position:"absolute",left:0});
content = $("#doc-content");
resizePackagesNav = $("#resize-packages-nav");
classesNav = $("#classes-nav");
sidenav = $("#side-nav");
devdocNav = $("#devdoc-nav");
var cookiePath = getSection() + "_";
if (!isMobile) {
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizePackagesHeight(); } });
$(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
var cookieWidth = readCookie(cookiePath+'width');
var cookieHeight = readCookie(cookiePath+'height');
if (cookieWidth) {
restoreWidth(cookieWidth);
} else if ($(".side-nav-resizable").length) {
resizeWidth();
}
if (cookieHeight) {
restoreHeight(cookieHeight);
} else {
resizeHeight();
}
}
if (devdocNav.length) { // only dev guide, resources, and sdk
tryPopulateResourcesNav();
highlightNav(location.href);
}
}
function highlightNav(fullPageName) {
var lastSlashPos = fullPageName.lastIndexOf("/");
var firstSlashPos;
if (fullPageName.indexOf("/guide/") != -1) {
firstSlashPos = fullPageName.indexOf("/guide/");
} else if (fullPageName.indexOf("/sdk/") != -1) {
firstSlashPos = fullPageName.indexOf("/sdk/");
} else {
firstSlashPos = fullPageName.indexOf("/resources/");
}
if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html')
fullPageName = fullPageName + "index.html";
}
// First check if the exact URL, with query string and all, is in the navigation menu
var pathPageName = fullPageName.substr(firstSlashPos);
var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
if (link.length == 0) {
var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length);
pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5); // +5 advances past ".html"
link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/resources/") != -1))) {
// if there's no match, then let's backstep through the directory until we find an index.html page
// that matches our ancestor directories (only for dev guide and resources)
lastBackstep = pathPageName.lastIndexOf("/");
while (link.length == 0) {
backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep);
link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory + 1)+"index.html']");
lastBackstep = pathPageName.lastIndexOf("/", lastBackstep - 1);
if (lastBackstep == 0) break;
}
}
}
// add 'selected' to the <li> or <div> that wraps this <a>
link.parent().addClass('selected');
// if we're in a toggleable root link (<li class=toggle-list><div><a>)
if (link.parent().parent().hasClass('toggle-list')) {
toggle(link.parent().parent(), false); // open our own list
// then also check if we're in a third-level nested list that's toggleable
if (link.parent().parent().parent().is(':hidden')) {
toggle(link.parent().parent().parent().parent(), false); // open the super parent list
}
}
// if we're in a normal nav link (<li><a>) and the parent <ul> is hidden
else if (link.parent().parent().is(':hidden')) {
toggle(link.parent().parent().parent(), false); // open the parent list
// then also check if the parent list is also nested in a hidden list
if (link.parent().parent().parent().parent().is(':hidden')) {
toggle(link.parent().parent().parent().parent().parent(), false); // open the super parent list
}
}
}
/* Resize the height of the nav panels in the reference,
* and save the new size to a cookie */
function resizePackagesHeight() {
var windowHeight = ($(window).height() - HEADER_HEIGHT);
var swapperHeight = windowHeight - 13; // move 13px for swapper link at the bottom
resizePackagesNav.css({maxHeight:swapperHeight + "px"});
classesNav.css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
$("#swapper").css({height:swapperHeight + "px"});
$("#packages-nav").css({height:parseInt(resizePackagesNav.css("height")) - 6 + "px"}); //move 6px for handle
var section = getSection();
writeCookie("height", resizePackagesNav.css("height"), section, null);
}
/* Resize the height of the side-nav and doc-content divs,
* which creates the frame effect */
function resizeHeight() {
var docContent = $("#doc-content");
// Get the window height and always resize the doc-content and side-nav divs
var windowHeight = ($(window).height() - HEADER_HEIGHT);
docContent.css({height:windowHeight + "px"});
$("#side-nav").css({height:windowHeight + "px"});
var href = location.href;
// If in the reference docs, also resize the "swapper", "classes-nav", and "nav-tree" divs
if (href.indexOf("/reference/") != -1) {
var swapperHeight = windowHeight - 13;
$("#swapper").css({height:swapperHeight + "px"});
$("#classes-nav").css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
$("#nav-tree").css({height:swapperHeight + "px"});
// If in the dev guide docs, also resize the "devdoc-nav" div
} else if (href.indexOf("/guide/") != -1) {
$("#devdoc-nav").css({height:sidenav.css("height")});
} else if (href.indexOf("/resources/") != -1) {
$("#devdoc-nav").css({height:sidenav.css("height")});
}
// Hide the "Go to top" link if there's no vertical scroll
if ( parseInt($("#jd-content").css("height")) <= parseInt(docContent.css("height")) ) {
$("a[href='#top']").css({'display':'none'});
} else {
$("a[href='#top']").css({'display':'inline'});
}
}
/* Resize the width of the "side-nav" and the left margin of the "doc-content" div,
* which creates the resizable side bar */
function resizeWidth() {
var windowWidth = $(window).width() + "px";
if (sidenav.length) {
var sidenavWidth = sidenav.css("width");
} else {
var sidenavWidth = 0;
}
content.css({marginLeft:parseInt(sidenavWidth) + 6 + "px"}); //account for 6px-wide handle-bar
if (isIE6) {
content.css({width:parseInt(windowWidth) - parseInt(sidenavWidth) - 6 + "px"}); // necessary in order to for scrollbars to be visible
}
resizePackagesNav.css({width:sidenavWidth});
classesNav.css({width:sidenavWidth});
$("#packages-nav").css({width:sidenavWidth});
if ($(".side-nav-resizable").length) { // Must check if the nav is resizable because IE6 calls resizeWidth() from resizeAll() for all pages
var section = getSection();
writeCookie("width", sidenavWidth, section, null);
}
}
/* For IE6 only,
* because it can't properly perform auto width for "doc-content" div,
* avoiding this for all browsers provides better performance */
function resizeAll() {
resizeHeight();
resizeWidth();
}
function getBaseUri(uri) {
var intlUrl = (uri.substring(0,6) == "/intl/");
if (intlUrl) {
base = uri.substring(uri.indexOf('intl/')+5,uri.length);
base = base.substring(base.indexOf('/')+1, base.length);
//alert("intl, returning base url: /" + base);
return ("/" + base);
} else {
//alert("not intl, returning uri as found.");
return uri;
}
}
function requestAppendHL(uri) {
//append "?hl=<lang> to an outgoing request (such as to blog)
var lang = getLangPref();
if (lang) {
var q = 'hl=' + lang;
uri += '?' + q;
window.location = uri;
return false;
} else {
return true;
}
}
function loadLast(cookiePath) {
var location = window.location.href;
if (location.indexOf("/"+cookiePath+"/") != -1) {
return true;
}
var lastPage = readCookie(cookiePath + "_lastpage");
if (lastPage) {
window.location = lastPage;
return false;
}
return true;
}
$(window).unload(function(){
var path = getBaseUri(location.pathname);
if (path.indexOf("/reference/") != -1) {
writeCookie("lastpage", path, "reference", null);
} else if (path.indexOf("/guide/") != -1) {
writeCookie("lastpage", path, "guide", null);
} else if (path.indexOf("/resources/") != -1) {
writeCookie("lastpage", path, "resources", null);
}
});
function toggle(obj, slide) {
var ul = $("ul:first", obj);
var li = ul.parent();
if (li.hasClass("closed")) {
if (slide) {
ul.slideDown("fast");
} else {
ul.show();
}
li.removeClass("closed");
li.addClass("open");
$(".toggle-img", li).attr("title", "hide pages");
} else {
ul.slideUp("fast");
li.removeClass("open");
li.addClass("closed");
$(".toggle-img", li).attr("title", "show pages");
}
}
function buildToggleLists() {
$(".toggle-list").each(
function(i) {
$("div:first", this).append("<a class='toggle-img' href='#' title='show pages' onClick='toggle(this.parentNode.parentNode, true); return false;'></a>");
$(this).addClass("closed");
});
}
function getNavPref() {
var v = readCookie('reference_nav');
if (v != NAV_PREF_TREE) {
v = NAV_PREF_PANELS;
}
return v;
}
function chooseDefaultNav() {
nav_pref = getNavPref();
if (nav_pref == NAV_PREF_TREE) {
$("#nav-panels").toggle();
$("#panel-link").toggle();
$("#nav-tree").toggle();
$("#tree-link").toggle();
}
}
function swapNav() {
if (nav_pref == NAV_PREF_TREE) {
nav_pref = NAV_PREF_PANELS;
} else {
nav_pref = NAV_PREF_TREE;
init_default_navtree(toRoot);
}
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
writeCookie("nav", nav_pref, "reference", date.toGMTString());
$("#nav-panels").toggle();
$("#panel-link").toggle();
$("#nav-tree").toggle();
$("#tree-link").toggle();
if ($("#nav-tree").is(':visible')) scrollIntoView("nav-tree");
else {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
}
}
function scrollIntoView(nav) {
var navObj = $("#"+nav);
if (navObj.is(':visible')) {
var selected = $(".selected", navObj);
if (selected.length == 0) return;
if (selected.is("div")) selected = selected.parent();
var scrolling = document.getElementById(nav);
var navHeight = navObj.height();
var offsetTop = selected.position().top;
if (selected.parent().parent().is(".toggle-list")) offsetTop += selected.parent().parent().position().top;
if(offsetTop > navHeight - 92) {
scrolling.scrollTop = offsetTop - navHeight + 92;
}
}
}
function changeTabLang(lang) {
var nodes = $("#header-tabs").find("."+lang);
for (i=0; i < nodes.length; i++) { // for each node in this language
var node = $(nodes[i]);
node.siblings().css("display","none"); // hide all siblings
if (node.not(":empty").length != 0) { //if this languages node has a translation, show it
node.css("display","inline");
} else { //otherwise, show English instead
node.css("display","none");
node.siblings().filter(".en").css("display","inline");
}
}
}
function changeNavLang(lang) {
var nodes = $("#side-nav").find("."+lang);
for (i=0; i < nodes.length; i++) { // for each node in this language
var node = $(nodes[i]);
node.siblings().css("display","none"); // hide all siblings
if (node.not(":empty").length != 0) { // if this languages node has a translation, show it
node.css("display","inline");
} else { // otherwise, show English instead
node.css("display","none");
node.siblings().filter(".en").css("display","inline");
}
}
}
function changeDocLang(lang) {
changeTabLang(lang);
changeNavLang(lang);
}
function changeLangPref(lang, refresh) {
var date = new Date();
expires = date.toGMTString(date.setTime(date.getTime()+(10*365*24*60*60*1000))); // keep this for 50 years
//alert("expires: " + expires)
writeCookie("pref_lang", lang, null, expires);
//changeDocLang(lang);
if (refresh) {
l = getBaseUri(location.pathname);
window.location = l;
}
}
function loadLangPref() {
var lang = readCookie("pref_lang");
if (lang != 0) {
$("#language").find("option[value='"+lang+"']").attr("selected",true);
}
}
function getLangPref() {
var lang = $("#language").find(":selected").attr("value");
if (!lang) {
lang = readCookie("pref_lang");
}
return (lang != 0) ? lang : 'en';
}
function toggleContent(obj) {
var button = $(obj);
var div = $(obj.parentNode);
var toggleMe = $(".toggle-content-toggleme",div);
if (button.hasClass("show")) {
toggleMe.slideDown();
button.removeClass("show").addClass("hide");
} else {
toggleMe.slideUp();
button.removeClass("hide").addClass("show");
}
$("span", button).toggle();
}

View File

@@ -0,0 +1,392 @@
/* API LEVEL TOGGLE */
<?cs if:reference.apilevels ?>
addLoadEvent(changeApiLevel);
<?cs /if ?>
var API_LEVEL_ENABLED_COOKIE = "api_level_enabled";
var API_LEVEL_COOKIE = "api_level";
var minLevel = 1;
function toggleApiLevelSelector(checkbox) {
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
var expiration = date.toGMTString();
if (checkbox.checked) {
$("#apiLevelSelector").removeAttr("disabled");
$("#api-level-toggle label").removeClass("disabled");
writeCookie(API_LEVEL_ENABLED_COOKIE, 1, null, expiration);
} else {
$("#apiLevelSelector").attr("disabled","disabled");
$("#api-level-toggle label").addClass("disabled");
writeCookie(API_LEVEL_ENABLED_COOKIE, 0, null, expiration);
}
changeApiLevel();
}
function buildApiLevelSelector() {
var maxLevel = SINCE_DATA.length;
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
var userApiLevel = readCookie(API_LEVEL_COOKIE);
userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
if (userApiLevelEnabled == 0) {
$("#apiLevelSelector").attr("disabled","disabled");
} else {
$("#apiLevelCheckbox").attr("checked","checked");
$("#api-level-toggle label").removeClass("disabled");
}
minLevel = $("body").attr("class");
var select = $("#apiLevelSelector").html("").change(changeApiLevel);
for (var i = maxLevel-1; i >= 0; i--) {
var option = $("<option />").attr("value",""+SINCE_DATA[i]).append(""+SINCE_DATA[i]);
// if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
select.append(option);
}
// get the DOM element and use setAttribute cuz IE6 fails when using jquery .attr('selected',true)
var selectedLevelItem = $("#apiLevelSelector option[value='"+userApiLevel+"']").get(0);
selectedLevelItem.setAttribute('selected',true);
}
function changeApiLevel() {
var maxLevel = SINCE_DATA.length;
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
var selectedLevel = maxLevel;
if (userApiLevelEnabled == 0) {
toggleVisisbleApis(selectedLevel, "body");
} else {
selectedLevel = $("#apiLevelSelector option:selected").val();
toggleVisisbleApis(selectedLevel, "body");
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
var expiration = date.toGMTString();
writeCookie(API_LEVEL_COOKIE, selectedLevel, null, expiration);
}
if (selectedLevel < minLevel) {
var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
$("#naMessage").show().html("<div><p><strong>This " + thing + " is not available with API Level " + selectedLevel + ".</strong></p>"
+ "<p>To use this " + thing + ", your application must specify API Level " + minLevel + " or higher in its manifest "
+ "and be compiled against a version of the library that supports an equal or higher API Level. To reveal this "
+ "document, change the value of the API Level filter above.</p>"
+ "<p><a href='" +toRoot+ "guide/appendix/api-levels.html'>What is the API Level?</a></p></div>");
} else {
$("#naMessage").hide();
}
}
function toggleVisisbleApis(selectedLevel, context) {
var apis = $(".api",context);
apis.each(function(i) {
var obj = $(this);
var className = obj.attr("class");
var apiLevelIndex = className.lastIndexOf("-")+1;
var apiLevelEndIndex = className.indexOf(" ", apiLevelIndex);
apiLevelEndIndex = apiLevelEndIndex != -1 ? apiLevelEndIndex : className.length;
var apiLevel = className.substring(apiLevelIndex, apiLevelEndIndex);
if (apiLevel > selectedLevel) obj.addClass("absent").attr("title","Requires API Level "+apiLevel+" or higher");
else obj.removeClass("absent").removeAttr("title");
});
}
/* NAVTREE */
function new_node(me, mom, text, link, children_data, api_level)
{
var node = new Object();
node.children = Array();
node.children_data = children_data;
node.depth = mom.depth + 1;
node.li = document.createElement("li");
mom.get_children_ul().appendChild(node.li);
node.label_div = document.createElement("div");
node.label_div.className = "label";
if (api_level != null) {
$(node.label_div).addClass("api");
$(node.label_div).addClass("api-level-"+api_level);
}
node.li.appendChild(node.label_div);
node.label_div.style.paddingLeft = 10*node.depth + "px";
if (children_data == null) {
// 12 is the width of the triangle and padding extra space
node.label_div.style.paddingLeft = ((10*node.depth)+12) + "px";
} else {
node.label_div.style.paddingLeft = 10*node.depth + "px";
node.expand_toggle = document.createElement("a");
node.expand_toggle.href = "javascript:void(0)";
node.expand_toggle.onclick = function() {
if (node.expanded) {
$(node.get_children_ul()).slideUp("fast");
node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
node.expanded = false;
} else {
expand_node(me, node);
}
};
node.label_div.appendChild(node.expand_toggle);
node.plus_img = document.createElement("img");
node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
node.plus_img.className = "plus";
node.plus_img.border = "0";
node.expand_toggle.appendChild(node.plus_img);
node.expanded = false;
}
var a = document.createElement("a");
node.label_div.appendChild(a);
node.label = document.createTextNode(text);
a.appendChild(node.label);
if (link) {
a.href = me.toroot + link;
} else {
if (children_data != null) {
a.className = "nolink";
a.href = "javascript:void(0)";
a.onclick = node.expand_toggle.onclick;
// This next line shouldn't be necessary. I'll buy a beer for the first
// person who figures out how to remove this line and have the link
// toggle shut on the first try. --joeo@android.com
node.expanded = false;
}
}
node.children_ul = null;
node.get_children_ul = function() {
if (!node.children_ul) {
node.children_ul = document.createElement("ul");
node.children_ul.className = "children_ul";
node.children_ul.style.display = "none";
node.li.appendChild(node.children_ul);
}
return node.children_ul;
};
return node;
}
function expand_node(me, node)
{
if (node.children_data && !node.expanded) {
if (node.children_visited) {
$(node.get_children_ul()).slideDown("fast");
} else {
get_node(me, node);
if ($(node.label_div).hasClass("absent")) $(node.get_children_ul()).addClass("absent");
$(node.get_children_ul()).slideDown("fast");
}
node.plus_img.src = me.toroot + "assets/images/triangle-opened-small.png";
node.expanded = true;
// perform api level toggling because new nodes are new to the DOM
var selectedLevel = $("#apiLevelSelector option:selected").val();
toggleVisisbleApis(selectedLevel, "#side-nav");
}
}
function get_node(me, mom)
{
mom.children_visited = true;
for (var i in mom.children_data) {
var node_data = mom.children_data[i];
mom.children[i] = new_node(me, mom, node_data[0], node_data[1],
node_data[2], node_data[3]);
}
}
function this_page_relative(toroot)
{
var full = document.location.pathname;
var file = "";
if (toroot.substr(0, 1) == "/") {
if (full.substr(0, toroot.length) == toroot) {
return full.substr(toroot.length);
} else {
// the file isn't under toroot. Fail.
return null;
}
} else {
if (toroot != "./") {
toroot = "./" + toroot;
}
do {
if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
var pos = full.lastIndexOf("/");
file = full.substr(pos) + file;
full = full.substr(0, pos);
toroot = toroot.substr(0, toroot.length-3);
}
} while (toroot != "" && toroot != "/");
return file.substr(1);
}
}
function find_page(url, data)
{
var nodes = data;
var result = null;
for (var i in nodes) {
var d = nodes[i];
if (d[1] == url) {
return new Array(i);
}
else if (d[2] != null) {
result = find_page(url, d[2]);
if (result != null) {
return (new Array(i).concat(result));
}
}
}
return null;
}
function load_navtree_data(toroot) {
var navtreeData = document.createElement("script");
navtreeData.setAttribute("type","text/javascript");
navtreeData.setAttribute("src", toroot+"navtree_data.js");
$("head").append($(navtreeData));
}
function init_default_navtree(toroot) {
init_navtree("nav-tree", toroot, NAVTREE_DATA);
// perform api level toggling because because the whole tree is new to the DOM
var selectedLevel = $("#apiLevelSelector option:selected").val();
toggleVisisbleApis(selectedLevel, "#side-nav");
}
function init_navtree(navtree_id, toroot, root_nodes)
{
var me = new Object();
me.toroot = toroot;
me.node = new Object();
me.node.li = document.getElementById(navtree_id);
me.node.children_data = root_nodes;
me.node.children = new Array();
me.node.children_ul = document.createElement("ul");
me.node.get_children_ul = function() { return me.node.children_ul; };
//me.node.children_ul.className = "children_ul";
me.node.li.appendChild(me.node.children_ul);
me.node.depth = 0;
get_node(me, me.node);
me.this_page = this_page_relative(toroot);
me.breadcrumbs = find_page(me.this_page, root_nodes);
if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
var mom = me.node;
for (var i in me.breadcrumbs) {
var j = me.breadcrumbs[i];
mom = mom.children[j];
expand_node(me, mom);
}
mom.label_div.className = mom.label_div.className + " selected";
addLoadEvent(function() {
scrollIntoView("nav-tree");
});
}
}
/* TOGGLE INHERITED MEMBERS */
/* Toggle an inherited class (arrow toggle)
* @param linkObj The link that was clicked.
* @param expand 'true' to ensure it's expanded. 'false' to ensure it's closed.
* 'null' to simply toggle.
*/
function toggleInherited(linkObj, expand) {
var base = linkObj.getAttribute("id");
var list = document.getElementById(base + "-list");
var summary = document.getElementById(base + "-summary");
var trigger = document.getElementById(base + "-trigger");
var a = $(linkObj);
if ( (expand == null && a.hasClass("closed")) || expand ) {
list.style.display = "none";
summary.style.display = "block";
trigger.src = toRoot + "assets/images/triangle-opened.png";
a.removeClass("closed");
a.addClass("opened");
} else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
list.style.display = "block";
summary.style.display = "none";
trigger.src = toRoot + "assets/images/triangle-closed.png";
a.removeClass("opened");
a.addClass("closed");
}
return false;
}
/* Toggle all inherited classes in a single table (e.g. all inherited methods)
* @param linkObj The link that was clicked.
* @param expand 'true' to ensure it's expanded. 'false' to ensure it's closed.
* 'null' to simply toggle.
*/
function toggleAllInherited(linkObj, expand) {
var a = $(linkObj);
var table = $(a.parent().parent().parent()); // ugly way to get table/tbody
var expandos = $(".jd-expando-trigger", table);
if ( (expand == null && a.text() == "[Expand]") || expand ) {
expandos.each(function(i) {
toggleInherited(this, true);
});
a.text("[Collapse]");
} else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
expandos.each(function(i) {
toggleInherited(this, false);
});
a.text("[Expand]");
}
return false;
}
/* Toggle all inherited members in the class (link in the class title)
*/
function toggleAllClassInherited() {
var a = $("#toggleAllClassInherited"); // get toggle link from class title
var toggles = $(".toggle-all", $("#doc-content"));
if (a.text() == "[Expand All]") {
toggles.each(function(i) {
toggleAllInherited(this, true);
});
a.text("[Collapse All]");
} else {
toggles.each(function(i) {
toggleAllInherited(this, false);
});
a.text("[Expand All]");
}
return false;
}
/* Expand all inherited members in the class. Used when initiating page search */
function ensureAllInheritedExpanded() {
var toggles = $(".toggle-all", $("#doc-content"));
toggles.each(function(i) {
toggleAllInherited(this, true);
});
$("#toggleAllClassInherited").text("[Collapse All]");
}
/* HANDLE KEY EVENTS
* - Listen for Ctrl+F (Cmd on Mac) and expand all inherited members (to aid page search)
*/
var agent = navigator['userAgent'].toLowerCase();
var mac = agent.indexOf("macintosh") != -1;
$(document).keydown( function(e) {
var control = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey; // get ctrl key
if (control && e.which == 70) { // 70 is "F"
ensureAllInheritedExpanded();
}
});

Some files were not shown because too many files have changed in this diff Show More