Skip to content

Commit

Permalink
added known-bugs test case for JakeWharton#272
Browse files Browse the repository at this point in the history
  • Loading branch information
jgilfelt committed May 20, 2012
1 parent 9598f2b commit 1b76baf
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 0 deletions.
7 changes: 7 additions & 0 deletions samples/known-bugs/AndroidManifest.xml
Expand Up @@ -17,6 +17,13 @@


<!-- OPEN BUGS -->

<activity android:label="Issue #272" android:name=".Issue272">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.knownbugs.OPEN"/>
</intent-filter>
</activity>

<activity android:label="Issue #331" android:name=".Issue331">
<intent-filter>
Expand Down
52 changes: 52 additions & 0 deletions samples/known-bugs/res/layout/issue272_fragment_pager.xml
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->

<!-- Top-level content view for the simple fragment sample. -->


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent" android:layout_height="match_parent">

<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">
</android.support.v4.view.ViewPager>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Simple Fragment based ViewPager whose Fragments provide menu actions to the host Activity. Swipe once on pre ICS to load in a new fragment. New action menu items become unresponsive and appear to be rendered twice. Swipe again and the actions pressed previously will fire on the new fragment."/>

<LinearLayout android:orientation="horizontal"
android:gravity="center" android:measureWithLargestChild="true"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="0">
<Button android:id="@+id/goto_first"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="First">
</Button>
<Button android:id="@+id/goto_last"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Last">
</Button>
</LinearLayout>
</LinearLayout>

54 changes: 54 additions & 0 deletions samples/known-bugs/res/layout/issue272_fragment_pager_list.xml
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:drawable/gallery_thumb">

<TextView android:id="@+id/text"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Hello, world!"/>

<!-- The frame layout is here since we will be showing either
the empty view or the list view. -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" >
<!-- Here is the list. Since we are using a ListActivity, we
have to call it "@android:id/list" so ListActivity will
find it -->
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false"/>

<!-- Here is the view to show if the list is emtpy -->
<TextView android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="No items."/>

</FrameLayout>

</LinearLayout>

0 comments on commit 1b76baf

Please sign in to comment.