forked from JakeWharton/ActionBarSherlock
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added known-bugs test case for JakeWharton#272
- Loading branch information
Showing
4 changed files
with
410 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
54
samples/known-bugs/res/layout/issue272_fragment_pager_list.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
Oops, something went wrong.