亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

ViewFlow,一個滑動效果庫

系統 2044 0
ViewFlow,一個滑動效果庫

ViewFlow,一個滑動效果庫
第1種樣式例子:用法:
    
public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle(R.string.circle_title);
		setContentView(R.layout.circle_layout);

		viewFlow = (ViewFlow) findViewById(R.id.viewflow);
		viewFlow.setAdapter(new ImageAdapter(this));
		CircleFlowIndicator indic = (CircleFlowIndicator) findViewById(R.id.viewflowindic);
		viewFlow.setFlowIndicator(indic);
		
	}

  

布局:
    
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res/org.taptwo.android.widget.viewflow.example"
	android:orientation="vertical" 
	android:layout_width="fill_parent"
	android:layout_height="fill_parent"
	>
	<LinearLayout android:layout_height="wrap_content"
		android:layout_width="fill_parent" 
		android:gravity="center_horizontal"
		android:orientation="horizontal" 
		android:id="@+id/header_layout"
		>
		<org.taptwo.android.widget.CircleFlowIndicator
			android:padding="10dip" 
			android:layout_height="wrap_content"
			android:layout_width="wrap_content" 
			android:id="@+id/viewflowindic"
			android:background="#00000000"
			/>
	</LinearLayout>
	<org.taptwo.android.widget.ViewFlow
		android:id="@+id/viewflow" 
		android:layout_width="fill_parent"
		android:layout_height="fill_parent" 
		app:sidebuffer="3"
		/>
</LinearLayout>

  


第2種樣式例子:
    
public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle(R.string.title_title);
		setContentView(R.layout.title_layout);

		viewFlow = (ViewFlow) findViewById(R.id.viewflow);
		AndroidVersionAdapter adapter = new AndroidVersionAdapter(this);
		viewFlow.setAdapter(adapter);
		TitleFlowIndicator indicator = (TitleFlowIndicator) findViewById(R.id.viewflowindic);
		indicator.setTitleProvider(adapter);
		viewFlow.setFlowIndicator(indicator);
		
	}

  

布局:
    
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res/org.taptwo.android.widget.viewflow.example"
	android:orientation="vertical" 
	android:layout_width="fill_parent"
	android:layout_height="fill_parent"
	>
	<LinearLayout android:layout_width="fill_parent"
		android:gravity="center_horizontal" 
		android:id="@+id/header_layout"
		android:orientation="vertical" 
		android:layout_height="wrap_content"
		>
		<org.taptwo.android.widget.TitleFlowIndicator
			android:id="@+id/viewflowindic" 
			android:layout_height="wrap_content"
			android:layout_width="fill_parent"
			app:footerLineHeight="2"
			app:footerTriangleHeight="10" 
			app:textColor="#FFFFFFFF" 
			app:selectedColor="#FFFFC445" 
			app:footerColor="#FFFFC445" 
			app:titlePadding="10" 
			app:textSize="13" 
			android:layout_marginTop="10dip"
			/>

	</LinearLayout>
	<org.taptwo.android.widget.ViewFlow
		android:duplicateParentState="true" 
		android:id="@+id/viewflow"
		android:layout_width="fill_parent" 
		android:layout_height="fill_parent"
		/>
</LinearLayout> 

  


自定義屬性也一起貼上,方便參考:
    
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Tap2 AB <http://taptwo.se>

     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>
    <declare-styleable name="ViewFlow">
        <attr name="sidebuffer" format="integer" />
    </declare-styleable>
    <declare-styleable name="CircleFlowIndicator">
        <attr name="fillColor" format="color" />
        <attr name="strokeColor" format="color" />
        <attr name="radius" format="integer" />
    </declare-styleable>    
    <declare-styleable name="TitleFlowIndicator">
        <attr name="titlePadding" format="integer" />
        <attr name="selectedColor" format="color" />
        <attr name="textColor" format="color" />
        <attr name="textSize" format="float" />
        <attr name="footerLineHeight" format="integer" />
        <attr name="footerColor" format="color" />
        <attr name="footerTriangleHeight" format="integer" />
    </declare-styleable>    
</resources>

  


https://github.com/pakerfeldt/android-viewflow

ViewFlow,一個滑動效果庫


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!??!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 国产精品香蕉 | 欧美精品综合一区二区三区 | 精品国产一区二区三区四区色 | 男人的天堂视频 | 干成人| 欧美操穴视频 | 亚洲精品美女一区二区三区乱码 | 日本中文字幕在线看 | jiucao在线观看精品 | 久久青草免费免费91线频观看 | 欧美社区 | 色拍拍噜噜噜aⅴ在线观看 色拍拍欧美视频在线看 | 国产一级做a爱免费视频 | 精品欧美一区二区三区 | 日韩欧美一区二区精品久久 | 手机看片国产永久1204 | 免费一级淫片 | 国产激情一区二区三区四区 | 99精品国产高清一区二区麻豆 | 2021中文字幕亚洲精品 | 色黄网站青青草原免费 | 国产精品免费久久久久影院 | 日本岛国片在线观看 | 色国产在线 | 欧美精品v国产精品v | 欧美体内she精视频毛片 | 欧美在线播放成人免费 | 欧美精品一区二区在线观看 | 亚洲国产成人久久精品动漫 | 久久综合九色综合欧洲 | 色综合中文字幕 | 黄色视屏在线免费观看 | 国产精品欧美日韩精品 | 一级毛片视频播放 | 97精品国产高清在线看入口 | 国产婷婷色一区二区三区 | 91精品成人免费国产 | 一区二区三区欧美在线 | 欧洲成人免费视频 | 草草影院第一页 | 视频毛片 |