android ScrollView--Linearlayout可以上下拖动
动态添加:
- <?xml version="1.0" encoding="utf-8"?>
- <ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:scrollbars="vertical"
- android:fadingEdge="vertical">
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- >
- </LinearLayout>
- </ScrollView>
动态代码上:
scrollView=new ScrollView(getApplicationContext());
scrollView.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_dark));
scrollView.setScrollbarFadingEnabled(true);
scrollview.addView(XXXX);
值得一提的是XXX只能是一个总的控件或者一个子控件,如果直接添加两个子控件会报错。
android ScrollView--Linearlayout可以上下拖动的更多相关文章
- Android ScrollView中的组件设置android:layout_height="fill_parent"不起作用的解决办法
例子,在ScrollView下加入的组件,无论如何也不能自动扩展到屏幕高度. 布局文件. [html] <?xml version="1.0" encoding=" ...
- Android ScrollView+ViewPager+PullToRefreshListView
想达到此界面的风格 然后ViewPage里面第一个Fragment是一个瀑布流 这个瀑布流要有加载跟多 在ScrollView中,嵌套ViewPager,在ViewPager的每页使用Fragment ...
- android scrollview 简单的使用
以前写的Scrollview ,通常都是与Listview结合使用,不过因复杂可能新手不太懂,网上有许多文章,这里就不贴那个了DEMO了. 写了个简单的供大家参考:这样比较好理解(需要复杂的可以Q我 ...
- Android ScrollView嵌套HorizontalScrollView 滑动问题 ScrollView包括GridView显示问题
今天项目使用到ScrollView嵌套HorizontalScrollView,ScrollView里包括GridView,发现几个问题非常经典.在此记录: 问题1.ScrollView嵌套Horiz ...
- android scrollview listview显示不全
原来处理方法是重写ListView import android.content.Context; import android.util.AttributeSet; import android.v ...
- Android ScrollView嵌套ScrollView滚动的问题解决办法
引用:http://mengsina.iteye.com/blog/1707464 http://fenglog.com/article.asp?id=449 Android ScrollView嵌套 ...
- Android:ScrollView和SwipeRefreshLayout高度测量
今天组里的同事要做一个奇葩的效果,要求在ScrollView里嵌套一个RefreshLayout.类似代码如下: <?xml version="1.0" encoding=& ...
- Android ScrollView滚动实现大众点评、网易云音乐评论悬停效果
今天听着网易云音乐,写着代码,真是爽翻了. http://blog.csdn.net/linshijun33/article/details/47910833 网易云音乐这个产品亮点应该在评论这一模块 ...
- Android ScrollView监听滑动到顶部和底部的两种方式(你可能不知道的细节)
Android ScrollView监听滑动到顶部和底部,虽然网上很多资料都有说,但是不全,而且有些细节没说清楚 使用场景: 1. 做一些复杂动画的时候,需要动态判断当前的ScrollView是否滚动 ...
- android 06 LinearLayout
xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:la ...
随机推荐
- [译]Stairway to Integration Services Level 16 – Flexible Source Locations (多文件导入)
介绍 在本文中我们将利用SSIS参数,变量 以及 Foreach Loop Container 从多个源动态导入数据. 开始前我们先下载一些数据.WeatherData_Dec08_Apr09.zip ...
- django user模块改写
示例一:继承AbstractBaseUser,AbstractBaseUser只有三个字段password,last_login,is_active,以及需要复习的两个方法 def get_full_ ...
- android串行化getSerializable、getSerializableExtra
android串行化getSerializable.getSerializableExtra 传参 总结 案例1 不用 Bundle 封装数据 提交activity lst.setOnItemClic ...
- LeetCode——Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given su ...
- linux脚本:ftp自动传输文件
使用Shell脚本实现ftp的自动上传下载 http://liwenge.iteye.com/blog/566515 open 192.168.1.171 user guest 123456cd /h ...
- BZOJ 1800 fly-飞行棋
这道题其实考察的就是从其中能找到几条直径,因为这次数据范围比较小,所以只需设一个二维数组,记录一下每个点及每个点从零开始的位置,最后定一个变量记录周长,最后用个循环搜一下位置小于周长一半 ...
- __autoload函数
./index.php----------------------------------------------------------------------------------<?ph ...
- Linux常用命令 新手必看
文件和目录cd /home 进入 '/ home' 目录'cd .. 返回上一级目录cd ../.. 返回上两级目录cd 进入个人的主目录cd ~user1 进入个人的主目录cd - 返回上次所在的目 ...
- search_word
一个小程序,用asc码输出自己的名字.要求是,a~z两路输入,输出了一个完整的拼音之后还需要输出一个空格.—— 信息硬件过滤的雏形. module search_word ( clock , rese ...
- 一个开源Delphi分类组件推荐网页
https://github.com/Fr0sT-Brutal/awesome-delphi