实现屏幕下方展示的TAB分页

Word标题样式基准重置:彻底解决重新打开后自动缩进问题 本文深入剖析了Word文档中标题样式在重新打开后自动缩进问题的根源,并提供了两种根治方案。通过调整标题样式基准或将其设为“无样式”,并配合检查修正多级列表设置,可彻底解决这一常见格式顽疾,确保文档格式的稳定性与专业性。 阅读详情
 首先是效果图:


我把helloandroid兄的源代码整理了一下,并梳理了涉及到的知识点,总结如下:

1、TabActivity的使用
Java代码
  1. public class MainActivity extends TabActivity {   
  2.   
  3.     private TabHost tabHost;   
  4.   
  5.     @Override  
  6.     public void onCreate(Bundle savedInstanceState) {   
  7.   
  8.         super.onCreate(savedInstanceState);   
  9.         setContentView(R.layout.main);   
  10.         tabHost = getTabHost();   
  11.         populateTab();   
  12.   
  13.     }   
  14.   
  15.     /**  
  16.      * 组装tab控件  
  17.      */  
  18.     private void populateTab() {   
  19.   
  20.         Resources res = getResources();   
  21.   
  22.         populateTabItem(R.drawable.tab_home_selector,   
  23.                 res.getString(R.string.tab_home), new Intent(this,   
  24.                         HomeActivity.class));   
  25.         populateTabItem(R.drawable.tab_atme_selector,   
  26.                 res.getString(R.string.tab_refer), new Intent(this,   
  27.                         ReferActivity.class));   
  28.         populateTabItem(R.drawable.tab_message_selector,   
  29.                 res.getString(R.string.tab_secret), new Intent(this,   
  30.                         MessageActivity.class));   
  31.         populateTabItem(R.drawable.tab_explore_selector,   
  32.                 res.getString(R.string.tab_search), new Intent(this,   
  33.                         SearchActivity.class));   
  34.         populateTabItem(R.drawable.tab_focus_selector,   
  35.                 res.getString(R.string.tab_attention), new Intent(this,   
  36.                         AttentionActivity.class));   
  37.   
  38.     }   
  39.   
  40.     /**  
  41.      * 生成tab_item  
  42.      *   
  43.      * @param imageResourceSelector  
  44.      *            图片选择器  
  45.      * @param text  
  46.      *            文本  
  47.      * @param intent  
  48.      *            intent  
  49.      */  
  50.     private void populateTabItem(int imageResourceSelector, String text,   
  51.             Intent intent) {   
  52.   
  53.         View view = View.inflate(this, R.layout.tab_item, null);// 拼装view   
  54.         ((ImageView) view.findViewById(R.id.tab_item_imageview))   
  55.                 .setImageResource(imageResourceSelector);   
  56.         ((TextView) view.findViewById(R.id.tab_item_textview)).setText(text);   
  57.   
  58.         TabSpec spec = tabHost.newTabSpec(text).setIndicator(view)   
  59.                 .setContent(intent);// 将view注入spec   
  60.         tabHost.addTab(spec);   
  61.   
  62.     }   
  63.   
  64. }  
 
  1. public class MainActivity extends TabActivity {  
  2.   
  3.     private TabHost tabHost;  
  4.   
  5.     @Override  
  6.     public void onCreate(Bundle savedInstanceState) {  
  7.   
  8.         super.onCreate(savedInstanceState);  
  9.         setContentView(R.layout.main);  
  10.         tabHost = getTabHost();  
  11.         populateTab();  
  12.   
  13.     }  
  14.   
  15.     /** 
  16.      * 组装tab控件 
  17.      */  
  18.     private void populateTab() {  
  19.   
  20.         Resources res = getResources();  
  21.   
  22.         populateTabItem(R.drawable.tab_home_selector,  
  23.                 res.getString(R.string.tab_home), new Intent(this,  
  24.                         HomeActivity.class));  
  25.         populateTabItem(R.drawable.tab_atme_selector,  
  26.                 res.getString(R.string.tab_refer), new Intent(this,  
  27.                         ReferActivity.class));  
  28.         populateTabItem(R.drawable.tab_message_selector,  
  29.                 res.getString(R.string.tab_secret), new Intent(this,  
  30.                         MessageActivity.class));  
  31.         populateTabItem(R.drawable.tab_explore_selector,  
  32.                 res.getString(R.string.tab_search), new Intent(this,  
  33.                         SearchActivity.class));  
  34.         populateTabItem(R.drawable.tab_focus_selector,  
  35.                 res.getString(R.string.tab_attention), new Intent(this,  
  36.                         AttentionActivity.class));  
  37.   
  38.     }  
  39.   
  40.     /** 
  41.      * 生成tab_item 
  42.      *  
  43.      * @param imageResourceSelector 
  44.      *            图片选择器 
  45.      * @param text 
  46.      *            文本 
  47.      * @param intent 
  48.      *            intent 
  49.      */  
  50.     private void populateTabItem(int imageResourceSelector, String text,  
  51.             Intent intent) {  
  52.   
  53.         View view = View.inflate(this, R.layout.tab_item, null);// 拼装view   
  54.         ((ImageView) view.findViewById(R.id.tab_item_imageview))  
  55.                 .setImageResource(imageResourceSelector);  
  56.         ((TextView) view.findViewById(R.id.tab_item_textview)).setText(text);  
  57.   
  58.         TabSpec spec = tabHost.newTabSpec(text).setIndicator(view)  
  59.                 .setContent(intent);// 将view注入spec   
  60.         tabHost.addTab(spec);  
  61.   
  62.     }  
  63.   
  64. }  

Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent"  
  4.     android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">  
  5.   
  6.     <RelativeLayout android:orientation="vertical"  
  7.         android:layout_width="fill_parent" android:layout_height="fill_parent">  
  8.   
  9.         <include android:id="@+id/head_line" layout="@layout/head_line"  
  10.             android:layout_width="fill_parent" android:layout_height="wrap_content" />  
  11.   
  12.         <FrameLayout android:id="@android:id/tabcontent"  
  13.             android:layout_below="@id/head_line" android:layout_width="fill_parent"  
  14.             android:layout_height="fill_parent" android:layout_weight="1.0" />  
  15.   
  16.         <TabWidget android:id="@android:id/tabs" android:background="@drawable/tab_bkg"  
  17.             android:layout_gravity="bottom" android:layout_height="60.0dip"  
  18.             android:layout_width="fill_parent" android:fadingEdge="none"  
  19.             android:fadingEdgeLength="0.0px" android:paddingLeft="0.0dip"  
  20.             android:paddingTop="2.0dip" android:paddingRight="0.0dip"  
  21.             android:paddingBottom="0.0dip" android:layout_alignParentBottom="true"  
  22.             android:layout_alignParentTop="false" />  
  23.   
  24.     </RelativeLayout>  
  25.   
  26. </TabHost>  
 
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent"  
  4.     android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">  
  5.   
  6.     <RelativeLayout android:orientation="vertical"  
  7.         android:layout_width="fill_parent" android:layout_height="fill_parent">  
  8.   
  9.         <include android:id="@+id/head_line" layout="@layout/head_line"  
  10.             android:layout_width="fill_parent" android:layout_height="wrap_content" />  
  11.   
  12.         <FrameLayout android:id="@android:id/tabcontent"  
  13.             android:layout_below="@id/head_line" android:layout_width="fill_parent"  
  14.             android:layout_height="fill_parent" android:layout_weight="1.0" />  
  15.   
  16.         <TabWidget android:id="@android:id/tabs" android:background="@drawable/tab_bkg"  
  17.             android:layout_gravity="bottom" android:layout_height="60.0dip"  
  18.             android:layout_width="fill_parent" android:fadingEdge="none"  
  19.             android:fadingEdgeLength="0.0px" android:paddingLeft="0.0dip"  
  20.             android:paddingTop="2.0dip" android:paddingRight="0.0dip"  
  21.             android:paddingBottom="0.0dip" android:layout_alignParentBottom="true"  
  22.             android:layout_alignParentTop="false" />  
  23.   
  24.     </RelativeLayout>  
  25.   
  26. </TabHost>  

可以看到,TabActivity是继承自Activity,包含了一个TabHost组件。TabHost组件则是继承自FrameLayout的ViewGroup。

TabHost组件本身的id必须是@android:id/tabhost,它必须包含一个FrameLayout,并且该FrameLayout的id必须是@android:id/tabcontent,此外还要包含一个TabWidget,id是@android:id/tabs。

FrameLayout可以放置每个单独的Activity,而TabWidget则是每个Tab页签。默认第一个页签对应的Activity,会首先显示在FrameLayout里。然后每次点击其他的Tab页签,对应的Activity就会切换显示到FrameLayout里。这个有点类似html中的frameset的概念

2、在main.xml中有一行
Xml代码
  1. <include android:id="@+id/head_line" layout="@layout/head_line"  
  2.             android:layout_width="fill_parent" android:layout_height="wrap_content" />  
  1. <include android:id="@+id/head_line" layout="@layout/head_line"  
  2.             android:layout_width="fill_parent" android:layout_height="wrap_content" />  

作用是引入另一个View文件,head_line.xml
Xml代码
  1. <RelativeLayout android:background="@drawable/header"  
  2.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  3.     xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <Button android:id="@+id/top_btn_left" android:textColor="@color/button_text_selector"  
  6.         android:background="@drawable/top_refresh_selector"  
  7.         android:layout_width="wrap_content" android:layout_height="wrap_content"  
  8.         android:layout_marginLeft="12.0dip" android:layout_alignParentLeft="true"  
  9.         android:layout_centerVertical="true" />  
  10.   
  11.     <Button android:id="@+id/top_btn_right" android:textColor="@color/button_text_selector"  
  12.         android:background="@drawable/top_edit_selector" android:layout_width="wrap_content"  
  13.         android:layout_height="wrap_content" android:layout_marginRight="12.0dip"  
  14.         android:layout_alignParentRight="true" android:layout_centerVertical="true" />  
  15.   
  16.     <TextView android:id="@+id/top_title" android:textSize="22.0sp"  
  17.         android:textColor="@color/head_line_text" android:ellipsize="middle"  
  18.         android:gravity="center_horizontal" android:layout_width="wrap_content"  
  19.         android:layout_height="wrap_content" android:text="@string/user_name"  
  20.         android:singleLine="true" android:layout_toLeftOf="@id/top_btn_right"  
  21.         android:layout_toRightOf="@id/top_btn_left"  
  22.         android:layout_centerInParent="true"  
  23.         android:layout_alignWithParentIfMissing="true" />  
  24.   
  25. </RelativeLayout>  
 
  1. <RelativeLayout android:background="@drawable/header"  
  2.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  3.     xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <Button android:id="@+id/top_btn_left" android:textColor="@color/button_text_selector"  
  6.         android:background="@drawable/top_refresh_selector"  
  7.         android:layout_width="wrap_content" android:layout_height="wrap_content"  
  8.         android:layout_marginLeft="12.0dip" android:layout_alignParentLeft="true"  
  9.         android:layout_centerVertical="true" />  
  10.   
  11.     <Button android:id="@+id/top_btn_right" android:textColor="@color/button_text_selector"  
  12.         android:background="@drawable/top_edit_selector" android:layout_width="wrap_content"  
  13.         android:layout_height="wrap_content" android:layout_marginRight="12.0dip"  
  14.         android:layout_alignParentRight="true" android:layout_centerVertical="true" />  
  15.   
  16.     <TextView android:id="@+id/top_title" android:textSize="22.0sp"  
  17.         android:textColor="@color/head_line_text" android:ellipsize="middle"  
  18.         android:gravity="center_horizontal" android:layout_width="wrap_content"  
  19.         android:layout_height="wrap_content" android:text="@string/user_name"  
  20.         android:singleLine="true" android:layout_toLeftOf="@id/top_btn_right"  
  21.         android:layout_toRightOf="@id/top_btn_left"  
  22.         android:layout_centerInParent="true"  
  23.         android:layout_alignWithParentIfMissing="true" />  
  24.   
  25. </RelativeLayout>  

用这种方式可以实现View组件的复用,是很方便的,可以学习一下这种方式。把要复用的View写在单独的xml文件里,然后在其他需要的地方,只要直接include就可以了

3、每个Tab页签对应的View是tab_item.xml
Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <LinearLayout android:orientation="vertical"  
  3.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  4.     xmlns:android="http://schemas.android.com/apk/res/android">  
  5.   
  6.     <ImageView android:id="@+id/tab_item_imageview"  
  7.         android:layout_width="fill_parent" android:layout_height="32.0dip"  
  8.         android:scaleType="fitCenter" />  
  9.   
  10.     <TextView android:id="@+id/tab_item_textview"  
  11.         android:layout_width="fill_parent" android:layout_height="wrap_content"  
  12.         android:gravity="center" android:singleLine="true"  
  13.         android:marqueeRepeatLimit="1" android:textSize="11.0sp"  
  14.         android:ellipsize="marquee" />  
  15.   
  16. </LinearLayout>  
 
            <?xml version="1.0" encoding="UTF-8"?>  
  1. <LinearLayout android:orientation="vertical"  
  2.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  3.     xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <ImageView android:id="@+id/tab_item_imageview"  
  6.         android:layout_width="fill_parent" android:layout_height="32.0dip"  
  7.         android:scaleType="fitCenter" />  
  8.   
  9.     <TextView android:id="@+id/tab_item_textview"  
  10.         android:layout_width="fill_parent" android:layout_height="wrap_content"  
  11.         android:gravity="center" android:singleLine="true"  
  12.         android:marqueeRepeatLimit="1" android:textSize="11.0sp"  
  13.         android:ellipsize="marquee" />  
  14.   
  15. </LinearLayout>  

然后在java代码中进行组装
Java代码  
  1. View view = View.inflate(this, R.layout.tab_item, null);// 拼装view   
  2.         ((ImageView) view.findViewById(R.id.tab_item_imageview))   
  3.                 .setImageResource(imageResourceSelector);   
  4.         ((TextView) view.findViewById(R.id.tab_item_textview)).setText(text);   
  5.   
  6.         TabSpec spec = tabHost.newTabSpec(text).setIndicator(view)   
  7.                 .setContent(intent);// 将view注入spec   
  8.         tabHost.addTab(spec);  
 
  1. View view = View.inflate(this, R.layout.tab_item, null);// 拼装view   
  2.         ((ImageView) view.findViewById(R.id.tab_item_imageview))  
  3.                 .setImageResource(imageResourceSelector);  
  4.         ((TextView) view.findViewById(R.id.tab_item_textview)).setText(text);  
  5.   
  6.         TabSpec spec = tabHost.newTabSpec(text).setIndicator(view)  
  7.                 .setContent(intent);// 将view注入spec   
  8.         tabHost.addTab(spec);  

这部分的详细说明,可以看google提供的API

4、然后这个页面中用到了selector的概念,即当要动态改变某些组件的属性,如颜色,字体大小等,可以用selector来进行动态选择,这里有点类似CSS中的伪类的概念
Xml代码
  1. android:textColor="@color/button_text_selector"  

 

  1. android:textColor="@color/button_text_selector"  

Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <selector xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <item android:state_pressed="true" android:color="@color/button_text_pressed" />  
  6.   
  7.     <item android:state_selected="true" android:color="@color/button_text_pressed" />  
  8.   
  9.     <item android:color="@color/button_text_normal" />  
  10.   
  11. </selector>  
 
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <selector xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <item android:state_pressed="true" android:color="@color/button_text_pressed" />  
  6.   
  7.     <item android:state_selected="true" android:color="@color/button_text_pressed" />  
  8.   
  9.     <item android:color="@color/button_text_normal" />  
  10.   
  11. </selector>  

上面代码的意思是,根据按钮控件是否按下,是否选择,在运行时动态决定颜色。通过同样的方式,还可以动态决定一个按钮的图片
Xml代码
  1. <selector  
  2.   xmlns:android="http://schemas.android.com/apk/res/android">  
  3.     <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/top_edit_normal" />  
  4.     <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/top_edit_press" />  
  5.     <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/top_edit_normal" />  
  6.     <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/top_edit_press" />  
  7.     <item android:state_pressed="true" android:drawable="@drawable/top_edit_press" />  
  8. </selector>  
 
  1. <selector  
  2.   xmlns:android="http://schemas.android.com/apk/res/android">  
  3.     <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/top_edit_normal" />  
  4.     <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/top_edit_press" />  
  5.     <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/top_edit_normal" />  
  6.     <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/top_edit_press" />  
  7.     <item android:state_pressed="true" android:drawable="@drawable/top_edit_press" />  
  8. </selector>  

5、这个页面还用到了一个比较特殊的技巧,就是通过xml,而不是静态图片来绘制背景
Xml代码
  1. <RelativeLayout android:background="@drawable/header"  
  2.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  3.     xmlns:android="http://schemas.android.com/apk/res/android">  
 
  1. <RelativeLayout android:background="@drawable/header"  
  2.     android:layout_width="fill_parent" android:layout_height="wrap_content"  
  3.     xmlns:android="http://schemas.android.com/apk/res/android">  

上面代码中的android:background="@drawable/header",指向drawable文件夹中的header.xml
Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <gradient android:startColor="#ff6c7078" android:endColor="#ffa6abb5"  
  6.         android:angle="270.0" android:type="linear" />  
  7.   
  8. </shape>  
 
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">  
  4.   
  5.     <gradient android:startColor="#ff6c7078" android:endColor="#ffa6abb5"  
  6.         android:angle="270.0" android:type="linear" />  
  7.   
  8. </shape>  
【Linux】Windows11 安装 WSL2 并运行 Ubuntu 22.04 详细操作步骤 Windows 11 安装 WSL2 和 Ubuntu 22.04 指南 本文详细介绍在 Windows 11 上安装 WSL2 和 Ubuntu 22.04 的完整步骤,包括: WSL2 与 VirtualBox 的性能对比优势 系统版本检查与升级方法 两种安装方式(一键安装和手动安装) Ubuntu 22.04 的安装与配置 存储位置管理及迁移技巧 常用 WSL2 命令速查表 文章还提供了性能优化建议和常见问题解决方案,适合开发者和 Linux 爱好者快速搭建高效的开发环境。 阅读详情

相关推荐

CSR-DCF视频目标跟踪源码运行笔记

论文基本信息 论文标题:Discriminative Correlation Filter with Channel and Spatial Reliability 论文作者:Alan Lukezic等 论文出处:CVPR 2017 文章链接:https://arxiv.org/abs/1611.08461 补充材料:https://www.semanticscholar.org/paper/D...

越野者的博客 3401

Android中实现可滑动的Tab的3种方式

这篇文章主要介绍了Android中实现可滑动的Tab的3种方式,需要的朋友可以参考下 1. 第一种,使用 TabHost + ViewPager 实现 该方法会有一个Bug,当设置tabHost.setCurrentTab()为0时,ViewPager不显示(准确的说是加载),只有点击其他任意一个tab后才会加载。 有解的同学吼一声~~~~~~~

像个孩子壹洋 1163

一种基于因果干预的少样本学习的故障诊断模型

本文提出CIRNet,一种融合元学习与因果干预的少样本故障诊断框架。针对传统方法易学习伪相关特征的问题,CIRNet通过构建结构因果模型,采用类级和特征级双调整策略消除先验知识干扰。实验在多个轴承/齿轮数据集上验证其有效性,在跨组件任务中准确率最高达93.41%,特征可视化显示更好的类可分性。相比现有方法,CIRNet显著提升了模型泛化能力和可解释性。

hasakie的博客 957

TabX Explorer 牛氓软件卸载

突然自动给我安装了一个TabX Explorer文件管理软件,莫名其妙,安装后退出不了,任务管理器强行停止后又会出来,连系统的卸载程序都打不开

meiaoxue1234的博客 6265

嵌入式系统存储体系

主要分为三种:高速缓存(cache)、主存和外存。

weixin_43586667的博客 2266

从零构建智慧农业监测终端:STM32数据采集与LoRa组网实战

本文详细介绍了如何从零构建智慧农业监测终端,涵盖STM32数据采集与LoRa组网实战。通过DHT22温湿度传感器和YL-69土壤湿度传感器实现精准环境监测,结合LoRa无线传输技术解决偏远农田信号问题。文章还分享了硬件选型、电路设计、低功耗优化及Flutter跨平台应用开发等关键技巧,助力农业智能化升级。

weixin_29172963的博客 357

解决卸载TabX explorer软件后导致系统文件资源管理器无法正常使用问题

解决卸载TabX explorer软件后导致系统文件资源管理器无法正常使用问题

CrazyApp的博客 6230

C语言设计模式全面解析:从理论到28个实战示例

本文系统介绍了23种经典设计模式在C语言中的实现方法。通过结构体、函数指针等技巧,C语言可以优雅地模拟面向对象特性,实现代码复用与解耦。文章分类详解了创建型、结构型、行为型三大类模式,并提供了28个完整代码示例,包括单例、策略、观察者等核心模式的精简实现。这些模式在嵌入式系统、操作系统内核等场景中广泛应用,如状态机、事件驱动等。学习C语言设计模式的关键在于理解模式意图,掌握函数指针和结构体组合等技巧,并在实际项目中灵活运用。本文为C语言开发者提供了全面的设计模式参考指南。

数字人生 364

Harmony OS — TabList和Tab分页栏

文章目录1、TabList 是什么?2、TabList 常用属性3、Tab 常用属性4、实战:三个页签栏切换5、了解更多 1、TabList 是什么? 简单:页签栏组件 官方:Tablist可以实现多个页签栏的切换,Tab为某个页签。子页签通常放在内容区上方,展示不同的分类。页签名称应该简洁明了,清晰描述分类的内容。 2、TabList 常用属性 (1)设置默认状态和选中状态的字体颜色和indicator的颜色 <TabList ... ohos:normal_text_color="

qq_27494201的博客 1088

python实现下载和离线安装包环境

导出当前电脑python安装的所有包列表requirement.txt。

m0_60352504的博客 1677

IDEA出现闪退或打不开的解决方法

本身项目比较大,为了打开这个软件,可调节IDEA中安装的bin目录下有个。打开IDEA的时候过一会便闪退,可以再IDEA的右下角看到如下提示。(如果没有该提示,软件右下角也会有个红色感叹号,点开查看原因即可)闪退的多数原因大致是out of memory,内存溢出。查看任务管理器中的进程:(发现内存随时有溢出的情况)但也需要注意,该参数并不是越大越好,适中即可。只有个别原因是需要管理员权限就可执行!可以尽量减少软件的启动。

码农研究僧的博客 5945

前端table分页组件开发(手写组件)

到现在是实现了,当点击父组件的内容是,顶部table实时更新,然后要实现的就是我们点击顶部的table,父组件的内容更新了,这里我们需要做的就是,获取到当前点击的是什么内容,然后通过emit函数,将我们选中的内容传递出去,让父组件根据我们传递的数据实时渲染。先看下需求,在页面的顶部加入一样table,当我们点击table时底部的页面切换,中间的内容根据切换的tab来切换,tablei里还有小table,当点吉小table时,小table也跟着切换,先来看下实际的结果图。

m0_58002043的博客 2万+

【PyTorch深度学习项目实战100例目录】项目详解 + 数据集 + 完整源码

大家好,我是阿光。本专栏整理了《深度学习100例》,内包含了各种不同的深度学习项目,包含项目原理以及源码,每一个项目实例都附带有完整的代码+数据集。正在更新中~ ✨。

优快云 精品推荐 10万+

最全实现屏幕下方展示的TAB分页,android游戏开发入门题大学题

这里我特地整理了一份《Android开发核心知识点笔记》,里面就包含了自定义View相关的内容除了这份笔记,还给大家分享Android学习PDF+架构视频+面试文档+源码笔记,高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。分享上面这些资源,希望可以帮助到大家提升进阶,如果你觉得还算有用的话,不妨把它们推荐给你的朋友~喜欢本文的话,给我点个小赞、评论区留言或者转发支持一下呗~

2401_84556528的博客 725

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

结合Tab,ViewPager,Fragment实现简单分页滑动

在APP设计当中,使用ViewPager和Fragment来实现分页滑动并不少见,该设计可以利用少量的空间来实现多内容的展示。效果图如下: 一下是实现该功能的代码:MainActivitypublic class MainActivity extends AppCompatActivity { private ViewPager viewPager; @Override

QAQ 2691

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

利用ActivityGroup实现Tab分页标签

1 什么是ActivityGroup?         让我们先看看官方的文档里是怎么说的。(PS:我们下载的SDK里面就有,打开docs文件夹,使用浏览器查看index.html。) java.lang.Object     ?android.content.Context         ?android.content.ContextWrapper

wangjia55的专栏 793

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Android 开源框架ViewPageIndicator或ActionBarSherlock实现tab滑动分页效果

参考自:http://blog.youkuaiyun.com/xiaanming/article/details/9971721 http://blog.youkuaiyun.com/xiaanming/article/details/10766053 博主说的很清楚了,总结几个问题 一,共同的问题 1,项目都需要导入对应的类库,由于类库中包含android-support-v4.jar,所以项目中一定要删除

superjunjin的专栏 4433

vue里tab菜单横向展示,可分页功能组件实现

这个功能思路跟轮播图差不多,下面实现思路是按照tab宽度移动,具体实现直接上代码 子组件: <template> <div class="dataNav"> <el-button v-if="move != 0 && !dataLen" size='small' icon="el-icon-arrow-left" @click="navPrev"></el-button> <ul class="dataNavLis

weixin_43299180的博客 3042

直播软件app开发,vue里tab菜单横向展示,可分页功能组件实现

以上就是直播软件app开发,vue里tab菜单横向展示,可分页功能组件实现, 更多内容欢迎关注之后的文章。直播软件app开发,vue里tab菜单横向展示,可分页功能组件实现。

云豹网络科技 362

Android之Tab分页标签的实现方法--------采用ActivityGroup和GridView的结合

在前面,已经介绍了TabActivity和TabHost的结合实现Tab分页的三种方式。这里,将讲到采用ActivityGroup和GridView的结合,实现Tab分页。其实,这和TabActivity和TabHost的结合差不多。只不过,是自己把Tab的头部(选项栏)和页面视图分开实现。Tab头部采用GridView来实现,子页面采用LinearLayout容器来实现。然后把每个子...

dianzudi1839的博客 181

android阅读器分页原理,用h5怎么实现阅读器分页效果

现在市面上大多小说app的阅读页都能实现阅读翻页,让我们来看看这个效果用h5怎么实现需求: 有一段长字符串 将其按照屏幕容纳字数进行分页,然后用tab页的形式呈现出来首先初始化项目Document计算基本需要的数据(一行多少字 一页多少行)获取容器的宽度 由于我这里子元素都设置的100% 所以我只需要获取 最外层wrap的宽度一行有多少字 = 容器宽度/字体大小 取小值 可获取一行最少有多...

weixin_35972359的博客 837
上一篇: Android应用程序中加载进度设计
下一篇: 自定义CheckBox
cding1818
博客等级 码龄17年 963粉丝 154原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值