- 浏览: 5818583 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (890)
- WindowsPhone (0)
- android (88)
- android快速迭代 (17)
- android基础 (34)
- android进阶 (172)
- android高级 (0)
- android拾遗 (85)
- android动画&效果 (68)
- Material Design (13)
- LUA (5)
- j2me (32)
- jQuery (39)
- spring (26)
- hibernate (20)
- struts (26)
- tomcat (9)
- javascript+css+html (62)
- jsp+servlet+javabean (14)
- java (37)
- velocity+FCKeditor (13)
- linux+批处理 (9)
- mysql (19)
- MyEclipse (9)
- ajax (7)
- wap (8)
- j2ee+apache (24)
- 其他 (13)
- phonegap (35)
最新评论
-
Memories_NC:
本地lua脚本终于执行成功了,虽然不是通过redis
java中调用lua脚本语言1 -
ZHOU452840622:
大神://处理返回的接收状态 这个好像没有监听到 遇 ...
android 发送短信的两种方式 -
PXY:
拦截部分地址,怎么写的for(int i=0;i<lis ...
判断是否登录的拦截器SessionFilter -
maotou1988:
Android控件之带清空按钮(功能)的AutoComplet ...
自定义AutoCompleteTextView -
yangmaolinpl:
希望有表例子更好。。。,不过也看明白了。
浅谈onInterceptTouchEvent、onTouchEvent与onTouch
看图:
用法:
妙用TabHost
http://www.cnblogs.com/over140/archive/2011/03/02/1968042.html
Android入门第十五篇之ActivityGroup + GridView 实现Tab分页标签
http://blog.csdn.net/hellogv/archive/2010/12/06/6057174.aspx
/** */ package com.ql.activity; import java.util.ArrayList; import java.util.List; import com.ql.view.RadioStateDrawable; import com.ql.view.TabBarButton; import android.app.ActivityGroup; import android.app.LocalActivityManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.view.Display; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout; import android.widget.RadioGroup; public class ScrollableTabActivity extends ActivityGroup implements RadioGroup.OnCheckedChangeListener{ private LocalActivityManager activityManager; public LinearLayout contentViewLayout; private LinearLayout.LayoutParams contentViewLayoutParams; //private HorizontalScrollView bottomBar; private RadioGroup.LayoutParams buttonLayoutParams; private RadioGroup bottomRadioGroup; //private Context context; public List<Intent> intentList; private List<String> titleList; private List states; private SliderBarActivityDelegate delegate; private int defaultOffShade; private int defaultOnShade; private IntentFilter changeTabIntentFilter; private ChangeTabBroadcastReceiver changeTabBroadcastReceiver; public static String CURRENT_TAB_INDEX; public static String ACTION_CHANGE_TAB = ".changeTab"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //context = this; activityManager = getLocalActivityManager(); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.customslidingtabhost); //getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title); contentViewLayout = (LinearLayout)findViewById(R.id.contentViewLayout); //bottomBar = (HorizontalScrollView)findViewById(R.id.bottomBar); bottomRadioGroup = (RadioGroup)findViewById(R.id.bottomMenu); contentViewLayoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); defaultOffShade = RadioStateDrawable.SHADE_GRAY; defaultOnShade = RadioStateDrawable.SHADE_YELLOW; /* * alternative method to using XML for layout, not used */ /* if (inflateXMLForContentView()) { contentViewLayoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); } else { RelativeLayout mainLayout = new RelativeLayout(this); RelativeLayout.LayoutParams mainLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); mainLayout.setLayoutParams(mainLayoutParams); contentViewLayout = new LinearLayout(this); contentViewLayout.setOrientation(LinearLayout.VERTICAL); contentViewLayout.setBackgroundColor(Color.WHITE); contentViewLayoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); contentViewLayoutParams.bottomMargin = 55; mainLayout.addView(contentViewLayout, contentViewLayoutParams); bottomBar = new HorizontalScrollView(this); //bottomBar.setHorizontalFadingEdgeEnabled(false); RelativeLayout.LayoutParams bottomBarLayout = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, 55); bottomBarLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); mainLayout.addView(bottomBar, bottomBarLayout); bottomRadioGroup = new RadioGroup(this); bottomRadioGroup.setOrientation(RadioGroup.HORIZONTAL); LayoutParams bottomRadioGroupLayoutParam = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); bottomRadioGroup.setLayoutParams(bottomRadioGroupLayoutParam); bottomBar.addView(bottomRadioGroup); if (bottomBar()!=-1) bottomBar.setBackgroundResource(bottomBar()); //bottomBar.setBackgroundResource(R.drawable.bottom_bar); setContentView(mainLayout); }*/ bottomRadioGroup.setOnCheckedChangeListener(this); intentList = new ArrayList(); titleList = new ArrayList(); states = new ArrayList(); buttonLayoutParams = new RadioGroup.LayoutParams(320/5, 55); } public void onResume() { changeTabIntentFilter = new IntentFilter(ACTION_CHANGE_TAB); changeTabBroadcastReceiver = new ChangeTabBroadcastReceiver(); registerReceiver(changeTabBroadcastReceiver, changeTabIntentFilter); super.onResume(); } public void onPause() { unregisterReceiver(changeTabBroadcastReceiver); super.onPause(); } public void commit() { bottomRadioGroup.removeAllViews(); int optimum_visible_items_in_portrait_mode = 5; // try // { // WindowManager window = getWindowManager(); // Display display = window.getDefaultDisplay(); // int window_width = display.getWidth(); // // optimum_visible_items_in_portrait_mode = (int) (window_width/64.0); // } // catch (Exception e) // { // optimum_visible_items_in_portrait_mode = 5; // } // int screen_width = getWindowManager().getDefaultDisplay().getWidth(); int width; if (intentList.size()<=optimum_visible_items_in_portrait_mode) { width = screen_width/intentList.size(); } else { width = screen_width/5; } RadioStateDrawable.width = width; RadioStateDrawable.screen_width = screen_width; // int height = ViewTools.px2dip(this, 50); int height = this.px2dip(this, 50); RadioStateDrawable.height = height; buttonLayoutParams = new RadioGroup.LayoutParams(width, height); for (int i=0; i<intentList.size(); i++) { TabBarButton tabButton = new TabBarButton(this); int[] iconStates = (int[]) states.get(i); if (iconStates.length==1) tabButton.setState( titleList.get(i).toString(),iconStates[0]); else if (iconStates.length==2) tabButton.setState(titleList.get(i).toString(), iconStates[0], iconStates[1]); else if (iconStates.length==3) tabButton.setState(titleList.get(i).toString(), iconStates[0], iconStates[1], iconStates[2]); tabButton.setId(i); tabButton.setGravity(Gravity.CENTER); bottomRadioGroup.addView(tabButton, i, buttonLayoutParams); } setCurrentTab(0); } /** * <b><i>protected void addTab(String title, int offIconStateId, int onIconStateId, Intent intent)</i></b> <p><p> * Add a tab to the navigation bar by specifying the title, 1 image for button on-state, and 1 image for button off-state<p> * @param title a String that specifies that title of the tab button * @param onIconStateId id of the on-state image * @param offIconStateId id of the off-state image * @param intent intent to start when button is tapped */ protected void addTab(String title, int offIconStateId, int onIconStateId, Intent intent) { int[] iconStates = {onIconStateId, offIconStateId}; states.add(iconStates); intentList.add(intent); titleList.add(title); //commit(); } /** * <b><i>protected void addTab(String title, int iconStateId, Intent intent)</i></b> <p><p> * Add a tab to the navigation bar by specifying the title, and 1 image for the button. Default yellow/gray shade is used for button on/off state<p> * @param title a String that specifies that title of the tab button * @param iconStateId id of the image used for both on/off state * @param intent intent to start when button is tapped */ protected void addTab(String title, int iconStateId, Intent intent) { //int[] iconStates = {iconStateId}; int[] iconStates = {iconStateId, defaultOffShade, defaultOnShade}; states.add(iconStates); intentList.add(intent); titleList.add(title); //commit(); } /** * <b><i>protected void addTab(String title, int iconStateId, int offShade, int onShade, Intent intent)</i></b> <p><p> * Add a tab to the navigation bar by specifying the title, and 1 image for the button. Default yellow/gray shade is used for button on/off state<p> * @param title a String that specifies that title of the tab button * @param iconStateId id of the image used for both on/off state * @param offShade id for off-state color shades (e.g. RadioStateDrawable.SHADE_GRAY, RadioStateDrawable.SHADE_GREEN etc) * @param onShade id for on-state color shades (e.g. RadioStateDrawable.SHADE_GRAY, RadioStateDrawable.SHADE_GREEN etc) * @param intent intent to start when button is tapped */ protected void addTab(String title, int iconStateId, int offShade, int onShade, Intent intent) { int[] iconStates = {iconStateId, offShade, onShade}; states.add(iconStates); intentList.add(intent); titleList.add(title); //commit(); } /** * <b><i>protected void setDefaultShde(int offShade, int onShade)</i></b><p><p> * Sets the default on and off color shades of the bottom bar buttons<p> * If not specified, the default off shade is gray, and the default on shade is yellow * @param offShade id for off-state color shades (e.g. RadioStateDrawable.SHADE_GRAY, RadioStateDrawable.SHADE_GREEN etc) * @param onShade id for on-state color shades (e.g. RadioStateDrawable.SHADE_GRAY, RadioStateDrawable.SHADE_GREEN etc) */ protected void setDefaultShade(int offShade, int onShade) { defaultOffShade = offShade; defaultOnShade = onShade; } public void onCheckedChanged(RadioGroup group, int checkedId) { try { if (delegate!=null) delegate.onTabChanged(checkedId); } catch (Exception e){} Intent intent = intentList.get(checkedId); startGroupActivity( titleList.get(checkedId).toString(), intent ); onTabChanged(checkedId, intent); } // public void onTabChanged(int checkedId, Intent intent) { } public void startGroupActivity(String id, Intent intent) { contentViewLayout.removeAllViews(); View view = activityManager.startActivity(id, intent).getDecorView(); contentViewLayout.addView(view, contentViewLayoutParams); } public void setCurrentTab(int index) { bottomRadioGroup.check(index); startGroupActivity(titleList.get(index).toString(), (Intent)intentList.get(index)); } public int getCurrentTab() { return bottomRadioGroup.getCheckedRadioButtonId(); } /* * gets required R, not used */ public boolean inflateXMLForContentView() { /* setContentView(R.layout.customslidingtabhost); contentViewLayout = (LinearLayout)findViewById(R.id.contentViewLayout); bottomBar = (HorizontalScrollView)findViewById(R.id.bottomBar); bottomRadioGroup = (RadioGroup)findViewById(R.id.bottomMenu); */ return false; } public int bottomBar() { return -1; } /* * delegates */ public void setDelegate(SliderBarActivityDelegate delegate_) { delegate = delegate_; } public static abstract class SliderBarActivityDelegate { /* * Called when tab changed */ protected void onTabChanged(int tabIndex) {} } /* * Broadcast receiver to set current tab */ public class ChangeTabBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { int index = intent.getExtras().getInt(CURRENT_TAB_INDEX); setCurrentTab(index); } } //dip/px像素单位转换 public static int dip2px(Context context, float dipValue){ final float scale = context.getResources().getDisplayMetrics().density; return (int)(dipValue / scale + 0.5f); } public static int px2dip(Context context, float pxValue){ final float scale = context.getResources().getDisplayMetrics().density; return (int)(pxValue * scale + 0.5f); } }
package com.ql.view; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.graphics.drawable.StateListDrawable; import android.util.AttributeSet; import android.widget.RadioButton; public class TabBarButton extends RadioButton{ Context context; public TabBarButton(Context context) { super(context); this.context = context; } public TabBarButton(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; } public void setState(String label, int imageId) { RadioStateDrawable offDrawable = new RadioStateDrawable(context, imageId, label, false, RadioStateDrawable.SHADE_GRAY); RadioStateDrawable onDrawable = new RadioStateDrawable(context, imageId, label, true, RadioStateDrawable.SHADE_YELLOW); setStateImageDrawables(onDrawable,offDrawable); } public void setState(String label, int imageId, int offState, int onState) { RadioStateDrawable offDrawable = new RadioStateDrawable(context, imageId, label, false, offState); RadioStateDrawable onDrawable = new RadioStateDrawable(context, imageId, label, true, onState); setStateImageDrawables(onDrawable,offDrawable); } public void setState(String label, int onId, int offId) { Resources resource = this.getResources(); Drawable offDrawable = resource.getDrawable(offId); Drawable onDrawable = resource.getDrawable(onId); setStateImageDrawables(onDrawable,offDrawable); } private void setStateImageDrawables(Drawable onDrawable, Drawable offDrawable) { StateListDrawable drawables = new StateListDrawable(); int stateChecked = android.R.attr.state_checked; int stateFocused = android.R.attr.state_focused; int statePressed = android.R.attr.state_pressed; int stateWindowFocused = android.R.attr.state_window_focused; //Resources resource = this.getResources(); //Drawable xDrawable = resource.getDrawable(R.drawable.bottom_bar_highlight); drawables.addState(new int[]{ stateChecked, -stateWindowFocused}, offDrawable); drawables.addState(new int[]{-stateChecked, -stateWindowFocused}, offDrawable); drawables.addState(new int[]{ stateChecked, statePressed }, onDrawable); drawables.addState(new int[]{-stateChecked, statePressed }, onDrawable); drawables.addState(new int[]{ stateChecked, stateFocused }, onDrawable); drawables.addState(new int[]{-stateChecked, stateFocused }, offDrawable); drawables.addState(new int[]{ stateChecked }, onDrawable); drawables.addState(new int[]{-stateChecked }, offDrawable); drawables.addState(new int[]{ }, onDrawable); this.setButtonDrawable(drawables); } }
/** * */ package com.ql.view; import java.io.InputStream; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.Shader; import android.graphics.Paint.Align; import android.graphics.Paint.FontMetrics; import android.graphics.drawable.Drawable; public class RadioStateDrawable extends Drawable{ private int textSize = 14; private Bitmap bitmap; //private Bitmap highlightBitmap; private Shader shader; private Shader textShader; Context context; public static int width; public static int height; public static int screen_width; private boolean highlight; private String label; public static final int SHADE_GRAY = 0; public static final int SHADE_BLUE = 1; public static final int SHADE_MAGENTA = 2; public static final int SHADE_YELLOW = 3; public static final int SHADE_WHITE = 4; public static final int SHADE_RED = 5; public static final int SHADE_ORANGE = 6; public RadioStateDrawable(Context context, int imageID, String label, boolean highlight, int shade) { super(); this.highlight = highlight; this.context = context; this.label = label; InputStream is = context.getResources().openRawResource(imageID); bitmap = BitmapFactory.decodeStream(is).extractAlpha(); setShade(shade); //highlightBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.bottom_bar_highlight); } public RadioStateDrawable(Context context, int imageID, String label, boolean highlight, int startGradientColor, int endGradientColor) { super(); this.highlight = highlight; this.context = context; this.label = label; InputStream is = context.getResources().openRawResource(imageID); bitmap = BitmapFactory.decodeStream(is).extractAlpha(); int[] shades = new int[] { startGradientColor, endGradientColor}; shader = new LinearGradient(0, 0, 0, bitmap.getHeight(), shades, null, Shader.TileMode.MIRROR); } public void setShade(int shade) { int[] shades = new int[2]; switch (shade) { case SHADE_GRAY: { shades = new int[]{Color.LTGRAY, Color.DKGRAY }; break; } case SHADE_BLUE: { shades = new int[]{Color.CYAN, Color.BLUE }; break; } case SHADE_RED: { shades = new int[]{Color.MAGENTA, Color.RED }; break; } case SHADE_MAGENTA: { shades = new int[]{ Color.MAGENTA, Color.rgb(292, 52, 100) }; break; } case SHADE_YELLOW: { shades = new int[]{Color.YELLOW, Color.rgb(255, 126, 0) }; break; } case SHADE_ORANGE: { shades = new int[]{Color.rgb(255, 126, 0), Color.rgb(255,90,0) }; break; } case SHADE_WHITE: { shades = new int[]{Color.WHITE, Color.LTGRAY }; break; } } shader = new LinearGradient(0, 0, 0, bitmap.getHeight(), shades, null, Shader.TileMode.MIRROR); if (highlight) textShader = new LinearGradient(0, 0, 0, 10, new int[]{Color.WHITE, Color.LTGRAY}, null, Shader.TileMode.MIRROR); else textShader = new LinearGradient(0, 0, 0, 10, new int[]{Color.LTGRAY, Color.DKGRAY}, null, Shader.TileMode.MIRROR); } @Override public void draw(Canvas canvas) { int bwidth = bitmap.getWidth(); int bheight = bitmap.getHeight(); /* if (width==0) { if (screen_width==0) screen_width = 320; width=screen_width/5; }*/ int x = (width-bwidth)/2; int top = 2+(32-bheight)/2; // if (highlight) // canvas.drawColor(Color.LTGRAY); // else canvas.drawColor(Color.TRANSPARENT); Paint p = new Paint(); // p.setColor(Color.RED); // p.setStyle(Paint.Style.FILL); p.setTextSize(textSize); // p.setTypeface(Typeface.DEFAULT_BOLD); // p.setFakeBoldText(true); p.setTextAlign(Align.CENTER); p.setShader(textShader); p.setAntiAlias(true); FontMetrics fm = p.getFontMetrics(); int y = top+bheight + (int)(height-top-bheight - fm.ascent)/2; canvas.drawText(label, width/2 ,y, p); p.setShader(shader); // Rect rect = new Rect(); // rect.set(x, top, x+32, top+32); // Rect src = new Rect(); // src.set(0, 0, bwidth, bheight); canvas.drawBitmap(bitmap, x, top, p); } @Override public int getOpacity() { return 0; } @Override public void setAlpha(int alpha) {} @Override public void setColorFilter(ColorFilter cf) {} }
用法:
package com.ql.activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; public class MainActivity extends ScrollableTabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); setDelegate(new SliderBarActivityDelegateImpl()); Intent intent = new Intent(this, Test_1_Activity.class); this.addTab("首页", R.drawable.home, intent); intent = new Intent(this, Test_2_Activity.class); this.addTab("自选", R.drawable.mystock, intent); intent = new Intent(this, Test_3_Activity.class); this.addTab("排行", R.drawable.rank, intent); intent = new Intent(this, Test_4_Activity.class); this.addTab("主力", R.drawable.zhuli, intent); intent = new Intent(this, Test_6_Activity.class); this.addTab("Loading", R.drawable.zhuli, intent); commit();//别忘了执行 setCurrentTab(0); } private class SliderBarActivityDelegateImpl extends SliderBarActivityDelegate { /* * Optional callback method * called when users tap on the tab bar button */ protected void onTabChanged(int tabIndex) { Log.d("onTabChanged",""+tabIndex); if(tabIndex == 1) { //title.setText("啊啊啊啊"); } } } }
妙用TabHost
http://www.cnblogs.com/over140/archive/2011/03/02/1968042.html
Android入门第十五篇之ActivityGroup + GridView 实现Tab分页标签
http://blog.csdn.net/hellogv/archive/2010/12/06/6057174.aspx
发表评论
文章已被作者锁定,不允许评论。
-
NestedScrollView滚动到顶部固定子View悬停挂靠粘在顶端
2018-10-31 20:45 6991网上有一个StickyScrollView,称之为粘性Scro ... -
自定义Behavior实现AppBarLayout越界弹性效果
2017-03-31 09:33 10366一、继承AppBarLayout.Beha ... -
Android - 一种相似图片搜索算法的实现
2017-03-31 09:33 2621算法 缩小尺寸。 将图片缩小到8x8的尺寸,总共64个 ... -
使用SpringAnimation实现带下拉弹簧动画的 ScrollView
2017-03-30 11:30 2847在刚推出的 Support Library 25.3.0 里面 ... -
Android为应用添加角标(Badge)
2017-03-30 11:21 61741.需求简介 角标是什么意思呢? 看下图即可明了: 可 ... -
Android端与笔记本利用局域网进行FTP通信
2017-03-23 10:17 977先看图 打开前: 打开后: Activity类 ... -
PorterDuffColorFilter 在项目中的基本使用
2017-03-03 10:58 1353有时候标题栏会浮在内容之上,而内容会有颜色的变化,这时候就要求 ... -
ColorAnimationView 实现了滑动Viewpager 时背景色动态变化的过渡效果
2017-02-24 09:41 2220用法在注释中: import android.anima ... -
迷你轻量级全方向完美滑动处理侧滑控件SlideLayout
2017-01-16 16:53 2594纯手工超级迷你轻量级全方向完美滑动处理侧滑控件(比官方 sup ... -
Effect
2017-01-05 09:57 0https://github.com/JetradarMobi ... -
动态主题库Colorful,容易地改变App的配色方案
2016-12-27 14:49 2563Colorful是一个动态主题库,允许您很容易地改变App的配 ... -
对视图的对角线切割DiagonalView
2016-12-27 14:23 1116提供对视图的对角线切割,具有很好的用户定制 基本用法 ... -
仿淘宝京东拖拽商品详情页上下滚动黏滞效果
2016-12-26 16:53 3491比较常用的效果,有现成的,如此甚好!:) import ... -
让任意view具有滑动效果的SlideUp
2016-12-26 09:26 1705基本的类,只有一个: import android.a ... -
AdvancedWebView
2016-12-21 09:44 16https://github.com/delight-im/A ... -
可设置圆角背景边框的按钮, 通过调节色彩明度自动计算按下(pressed)状态颜色
2016-11-02 22:13 1920可设置圆角背景边框的的按钮, 通过调节色彩明度自动计算按下(p ... -
网络请求库相关
2016-10-09 09:35 62https://github.com/amitshekhari ... -
ASimpleCache一个简单的缓存框架
2015-10-26 22:53 2177ASimpleCache 是一个为android制定的 轻量级 ... -
使用ViewDragHelper实现的DragLayout开门效果
2015-10-23 10:55 3414先看一下图,有个直观的了解,向下拖动handle就“开门了”: ... -
保证图片长宽比的同时拉伸图片ImageView
2015-10-16 15:40 3732按比例放大图片,不拉伸失真 import android. ...
相关推荐
其中,Scrollable 是一个功能丰富的滚动组件,它允许用户以平滑、可定制的方式浏览内容,常用于新闻轮播、产品展示等场景。 在“jquery tools scrollable demo”中,我们主要会探讨以下几个知识点: 1. **jQuery ...
然而,值得注意的是,`ScrollableTable.js`并不支持纵向固定表头和拖动功能。这意味着在表格滚动时,表头会随着内容一起滚动,而非固定在屏幕顶部,这可能对用户在大量数据中定位和对比造成不便。同样,如果需要通过...
在移动应用开发中,`Scrollable` 是一个常见的组件,用于创建可滚动的内容区域,它允许用户通过滑动来查看超出屏幕范围的信息。本篇将深入探讨`Scrollable`组件的使用方法及其改装技巧,特别是在构建个人主页页面时...
"Scrollable HTML table" 是一个网页设计和前端开发的主题,它涉及到在HTML中创建可滚动的表格。这样的表格允许用户在数据量过大无法一次性完全展示时,通过滚动条查看所有内容。"Source JS and Example" 表示我们将...
【标题】"Scrollable.zip" 是一个包含与可滚动视图相关的编程资源的压缩包,可能是一个开源项目或代码库的归档。从文件名"Scrollable-master"来看,这很可能是某个Git仓库的主分支(通常是master分支)的克隆,通常...
在C#编程中,"绘制可拖动可平移图形"是一个常见的需求,尤其是在开发桌面应用或者游戏时。本教程将深入讲解如何实现这个功能,包括如何使用鼠标事件来绘制图形,以及如何实现图形的拖动和平移操作。 首先,我们需要...
Scrollable是一个灵活、轻量级用于创建滚动内容的jQuery插件。任何内容(HTML、视频、文件、图片等...)都可以作为一个滚动项。支持水平与垂直两种滚动方向。用途:滚动效果,可制作分步验证页面
scrollable jquery ui 下载
自己加了点功能,1. 支持iframe内的表格2.支持表格的滚动条在左边并且可配3.表格高度可配 增加参数:doc1(页面document对象,如果想对iframe内的页面产生左右,传入那个页面的document对象),scDir(方向'left'或者right)
当动态添加或删除滚动项后,调用此方法可自动更新分页导航及滚动项移动的相关信息。 - **示例**: - 删除最后一个滚动项并更新: ```javascript $("#remove").click(function () { scrollable.getItems().filter...
https://www.npmjs.com/package/react-native-scrollable-tab-view基础使用:var ScrollableTabView = require('react-native-scrollable-tab-view'); var App = React.createClass({ render() { ...
`flutter_scrollable_list` 是一个专为实现自适应和灵活滚动体验的组件。在这个话题中,我们将深入探讨`shrinkWrap`和`Expanded`这两个关键属性,以及它们如何在Flutter中帮助我们优化列表性能。 首先,让我们了解`...
React Native Scrollable Tab View 入门指南 React Native 是一个基于 React 的框架,用于构建跨平台的移动应用程序。React Native 提供了许多组件和API,帮助开发者快速构建高质量的移动应用程序。今天我们将探索 ...
4. **配置参数**:`scrollable()` 方法接受一个可选的配置对象,用于自定义滚动行为,例如滚动速度、方向、是否循环等。 ```javascript $('.scrollable-element').scrollable({ direction: 'vertical', // 或 '...
ng-scrollable, AngularJS的Superamazing滚动条 滚动AngularJS的Superamazing滚动条:为什么要滚动?因为 Firefox 不支持滚动条样式,或者其他 跨浏览器 选项不支持滚动条样式,所以对于复杂的单一页面应用程序来说...
本文将深入探讨如何实现TabLayout的标签拖动选择和重新排序功能,以达到类似某些视频网站首页导航栏的效果。 首先,我们需要在布局XML文件中添加TabLayout,并配置好相关的属性。例如: ```xml android:id="@+id...
Scrollable是其中的一个组件,能够将一组元素如图片、列表等内容包装起来,并提供一个可滚动的视图。用户可以通过滚动条或触摸滑动来浏览这些内容,使得内容展示更为紧凑和动态。 在本次的学习中,我们将深入探讨...
在Android开发中,有时我们需要创建一个可滚动的布局,其中包含固定的表头,同时支持ListView或GridView的滚动,以及下拉刷新和上拉加载更多的功能。`android带header的Scrollable`就是解决这类需求的一种实现方式。...