Skip to content

Commit

Permalink
am 2452c08: am 82365c2: am abededd: Docs: Sync browseable samples for…
Browse files Browse the repository at this point in the history
… lmp-docs

* commit '2452c0880d904d9e042e290b75acbe6f49b5208f':
  Docs: Sync browseable samples for lmp-docs
  • Loading branch information
tjohns authored and Android Git Automerger committed Dec 10, 2014
2 parents 2dbbfbb + 2452c08 commit b3493a5
Show file tree
Hide file tree
Showing 503 changed files with 8,907 additions and 2,690 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.wearable.elizachat.common">

<application android:allowBackup="true"
android:label="@string/app_name">
</application>

</manifest>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.wearable.recipeassistant.common">
<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

<application android:allowBackup="true"
android:label="@string/app_name">
</application>

</manifest>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>


</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>


</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public boolean onCreateOptionsMenu(Menu menu) {
// Now get the ShareActionProvider from the item
mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);

// Get the ViewPager's current item position and set its ShareIntent.
int currentViewPagerItem = ((ViewPager) findViewById(R.id.viewpager)).getCurrentItem();
setShareIntent(currentViewPagerItem);

return super.onCreateOptionsMenu(menu);
}
// END_INCLUDE(get_sap)
Expand Down Expand Up @@ -151,6 +155,19 @@ public Object instantiateItem(ViewGroup container, int position) {
}
};

private void setShareIntent(int position) {
// BEGIN_INCLUDE(update_sap)
if (mShareActionProvider != null) {
// Get the currently selected item, and retrieve it's share intent
ContentItem item = mItems.get(position);
Intent shareIntent = item.getShareIntent(MainActivity.this);

// Now update the ShareActionProvider with the new share intent
mShareActionProvider.setShareIntent(shareIntent);
}
// END_INCLUDE(update_sap)
}

/**
* A OnPageChangeListener used to update the ShareActionProvider's share intent when a new item
* is selected in the ViewPager.
Expand All @@ -165,16 +182,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse

@Override
public void onPageSelected(int position) {
// BEGIN_INCLUDE(update_sap)
if (mShareActionProvider != null) {
// Get the currently selected item, and retrieve it's share intent
ContentItem item = mItems.get(position);
Intent shareIntent = item.getShareIntent(MainActivity.this);

// Now update the ShareActionProvider with the new share intent
mShareActionProvider.setShareIntent(shareIntent);
}
// END_INCLUDE(update_sap)
setShareIntent(position);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>


</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>


</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

</resources>

This file was deleted.

6 changes: 3 additions & 3 deletions samples/browseable/ActivitySceneTransitionBasic/_index.jd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ sample.group=UI
<p>

Demonstrates how to the use Activity scene transitions when transitions
from one Activity to another. Uses a combination of moveImage and changeBounds
to nicely transition a grid of images to an Activity with a large image and detail
text.
from one Activity to another. Uses a combination of changeImageTransform and
changeBounds to nicely transition a grid of images to an Activity with a large image
and detail text.

</p>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.android.volley.toolbox.NetworkImageView
<ImageView
android:id="@+id/imageview_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.android.volley.toolbox.NetworkImageView
<ImageView
android:id="@+id/imageview_item"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,15 @@

<!--
The transitions which us used for the entrance and exit of shared elements. Here we declare
two different transitions which are targeting to specific views.
two different transitions which are targeting specific views.
-->
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">

<!-- changeBounds is used for the TextViews which are shared -->
<changeBounds>
<!--
Set this transitions target IDs to be those which point to the TextViews in both the
starting and result Activities
-->
<targets>
<target android:targetId="@id/textview_name" />
<target android:targetId="@id/textview_title" />
</targets>
</changeBounds>

<!-- moveImage is used for the ImageViews which are shared -->
<moveImage>
<!--
Set this transitions target IDs to be those which point to the ImageViews in both the
starting and result Activities
-->
<targets>
<target android:targetId="@id/imageview_header" />
<target android:targetId="@id/imageview_item" />
</targets>
</moveImage>
<changeBounds />

<!-- changeImageTransform is used for the ImageViews which are shared -->
<changeImageTransform />

</transitionSet>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>


</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>

<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>

</resources>
Loading

0 comments on commit b3493a5

Please sign in to comment.