这篇随笔将会简单的记录下ImageView这个控件的一些使用方法,以及其最重要的一个属性: scaleType
ImageView这个控件是用来显示图片用的,例如我们可以通过下面这段xml配置来声明显示一张图片:
ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
...
分类:
其他好文 时间:
2015-03-09 12:56:09
阅读次数:
149
仿QQ底端导航栏废话不多说,直接上代码<?xmlversion="1.0"encoding="UTF-8"?>
<!--Tab导航最新版-->
<TabHostxmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layou..
分类:
移动开发 时间:
2015-03-07 18:46:20
阅读次数:
253
main.xml代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertica...
分类:
移动开发 时间:
2015-03-06 11:23:31
阅读次数:
201
三、用视图拖拽+GridLayout实现简单移图游戏
这只实现了简单的最核心的UI,没有写判赢逻辑。
1、/YituGame/res/layout/activity_game_main_line.xml文件
android:layout_width="match_parent"
android:layout_height="match_parent"
andr...
分类:
移动开发 时间:
2015-03-06 10:04:44
阅读次数:
272
main.xml代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertica...
分类:
移动开发 时间:
2015-03-05 19:37:04
阅读次数:
147
1、popupwindow的布局文件:menu_layout.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@...
1.页面一main.xml代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="ve...
分类:
移动开发 时间:
2015-03-04 22:49:46
阅读次数:
204
第一步<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"
android:layout_height="match_parent"tools:context=".MainActivity">
<android.support.v4..
分类:
移动开发 时间:
2015-03-04 06:24:04
阅读次数:
185
(1)使用WebView则需要在布局文件中使用相应的布局控件
布局文件如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_p...
分类:
Web程序 时间:
2015-03-03 20:43:23
阅读次数:
214
新建一个Android工程。
一 布局
先看效果图:
打开main.xml修改内容如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_par...
分类:
移动开发 时间:
2015-03-03 20:42:33
阅读次数:
219