设为首页 加入收藏

TOP

Android 滚动Tab(二)
2014-11-24 03:32:23 来源: 作者: 【 】 浏览:4
Tags:Android 滚动 Tab
vertical" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/me"
android:text="@string/about_me_email"/>


然后是AboutMeFragment.java


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.lichen.remind.R;
public class AboutMeFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_about_me,container, false);
return rootView;
}
}


--------------------------------------------------------------------------------


资源文件strings.xml中, 使用了传入参数的方式.


< xml version="1.0" encoding="utf-8" >

Remind
Settings
关于我
chain_li7@163.com
%1$d 个Tab
这是第 %1$d 个Tab页面


--------------------------------------------------------------------------------


这样就可以看到上图滚动Tab了.


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android Action Bar 加入Back返回.. 下一篇Android Action Bar 自定义View

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·对于一个想入坑Linux (2025-12-25 11:49:07)
·Linux 怎么读? (2025-12-25 11:49:04)
·Linux 运维必备 150 (2025-12-25 11:49:01)
·Error generating ar (2025-12-25 11:24:46)
·Http 和 Https的区别 (2025-12-25 11:24:44)