2015-07-10 24 views
0

我是新來的機器人,所以請建議我如何做到以下幾點。我需要一個標籤視圖上方的文本框,爲此我需要定位標籤視圖。我在線學習了一下之後使用了ViewPager。任何人都可以提出任何建議來獲得我需要的東西? 我附上了一幅我想要在活動中創建的圖片。我可以在android中更改可滑動選項卡的位置嗎?

https://drive.google.com/open?id=0B4YOVOcFR_ChVzVoekJQbjZud3c

+0

你可以創建搜索o ñ行動吧。那是嗎?http://developer.android.com/guide/topics/search/search-dialog.html – sachithkn

+0

@ user2217535我不會保持行動欄。操作欄將被隱藏。 –

回答

1

我認爲你可以使用搜索視圖,tablayout和查看傳呼機一起

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
tools:context=".SearchViewActivity" > 

<SearchView 
    android:id="@+id/searchView" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_centerHorizontal="true" > 
</SearchView> 


<android.support.design.widget.TabLayout 
     android:id="@+id/tabs" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

<android.support.v4.view.ViewPager 
    android:id="@+id/viewpager" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 
</RelativeLayout> 

你可以看theese鏈接

https://github.com/chrisbanes/cheesesquare/blob/master/app/src/main/res/layout/include_list_viewpager.xml

https://looksok.wordpress.com/2013/06/15/android-searchview-tutorial-edittext-with-phone-contacts-search-and-autosuggestion/

相關問題