Android 开发笔记___滚动视图__scroll view
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="演示效果"
android:textColor="@color/text_color"
android:textSize="25sp"
android:layout_gravity="center"/> <LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"> <HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="match_parent"> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"> <View
android:layout_width="400dp"
android:background="#aaffff"
android:layout_height="match_parent"/> <View
android:layout_width="400dp"
android:layout_height="match_parent"
android:background="#ffff00"/> </LinearLayout>
</HorizontalScrollView> </LinearLayout> <ScrollView
android:fillViewport="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"> <LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"> <View
android:layout_width="match_parent"
android:background="#aa5511"
android:layout_height="400dp"/> <View
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="#ffff00"/> <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="scrollview 的使用,有两种。\n垂直方向、水平方向。\n视图里面只能放一个布局"/> </LinearLayout> </ScrollView> </LinearLayout>
java
package com.example.alimjan.hello_world; import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable; /**
* Created by alimjan on 6/30/2017.
*/ public class class__2_2_3 extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.code_2_2_3);
} public static void startHome(Context mContext) {
Intent intent = new Intent(mContext, class__2_2_3.class);
mContext.startActivity(intent);
}
}
Android 开发笔记___滚动视图__scroll view的更多相关文章
- Android 开发笔记___图像视图__简单截屏
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- Android 开发笔记___图像视图
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- Android 开发笔记___初级控件之实战__计算器
功能简单,实现并不难,对于初学者可以总和了解初级控件的基本使用. 用到的知识点如下: 线性布局 LinearLayout:整体界面是从上往下的,因此需要垂直方向的linearlayout:下面每行四个 ...
- Android 开发笔记___基本适配器的使用__BaseAdapter
之前用到过ArryAdapter适用于纯文本的列表数据,SimpleAdapter适用于带图标的列表数据,但在实际应用中常常有更复杂的列表,比如同一项中存在多个控件,这时候用前面的两个会比较复杂,而且 ...
- Android 开发笔记___时间选择器---timePicker
像datepicker一样,也有timepicker. 同样有timepickerdialog 所用到的方法还是一样,监听时间选择器的变化. package com.example.alimjan.h ...
- Android 开发笔记___实战项目:购物车
购物车的应用很广泛,电商app基本上都有它的身影.由于它用到了多种存储方式,通过项目对数据的存储有更高层次的了解. 1.设计思路 首先看看购物车的外观.第一次进入时里面是空的,去购物页面加入购物车以后 ...
- Android 开发笔记___存储方式__共享参数__sharedprefences
Android 的数据存储方式有四种,这次是[共享参数__sharedprefences] 听起来挺别扭的,平时看到的app里面,当用户删除了一些软件以后下次安装,发现原来的设置还在,这种情况就是把一 ...
- Android 开发笔记___登陆app
package com.example.alimjan.hello_world; /** * Created by alimjan on 7/4/2017. */ import android.con ...
- Android 开发笔记___图像按钮__imageButton
IMAGEBUTTON 其实派生自image view,而不是派生自button.,image view拥有的属性和方法,image button 统统拥有,只是imagebutton有个默认的按钮外 ...
随机推荐
- Docker入门之六端口映射与容器互联
一.端口映射 在之前的博客搭建私有仓库时用到这样一句:docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry registry来r ...
- Java历程-初学篇 Day03扫描仪与类型转换
一,扫描仪 步骤1,使用扫描仪方法 步骤2,导个包 步骤三,使用 注意事项:严格区分大小写 二,类型转换 1,自动类型转换 当将一个数值范围小的类型赋给一个数值范围大的数值型变量,java在编译过程中 ...
- ASP.NET没有魔法——ASP.NET MVC & 分层
上一篇文章简要说明了MVC所代表的含义并提供了详细的项目及其控制器.视图等内容的创建步骤,最终完成了一个简单ASP.NET MVC程序. 注:MVC与ASP.NET MVC不相等,MVC是一种开发模式 ...
- Django 1.10中文文档-聚合
Django 数据库抽象API 描述了使用Django 查询来增删查改单个对象的方法. 然而,有时候你要获取的值需要根据一组对象聚合后才能得到. 这个主题指南描述了如何使用Django的查询来生成和返 ...
- Vue的条件渲染
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- WebApi接口返回json,xml,text纯文本等
[Route("api/Message/MessageList/")] [HttpGet] public HttpResponseMessage MessageList() { R ...
- 高效实用的.NET开源项目
似乎...很久很久没有写博客了,一直都想写两篇,但是却没有时间写.感觉最近有很多事情需要处理,一直都是疲于奔命,一直到最近才变得有些时间学习和充电.最近没有事情都会看一些博客和开源项目,发现介绍开源项 ...
- Java加密与解密笔记(一) Base64和数据摘要算法
对加密解密下面的内容一定要先理解: 甲乙双方要通信,中间的连接可能被人窃听甚至篡改.解决办法就是把传输的内容进行加密,用密文去传输,这样即使被监听也没办法知道信息的具体内容. 加密时,甲乙双方可以约定 ...
- XamlReader动态使用xaml
xamlload先在xaml做出一个grid,命名xgrid <Page x:Class="xamlload.MainPage" xmlns="http://sch ...
- js金钱转大写
function Arabia_to_Chinese(Num) { // var money=$("#deal_amount").val(); for ( i = Num.leng ...