目前,在eclipse的ADT Android插件中,还不能启动Hierachy Viewer,但可以从Android SDK工具包中,通过命令行的方式可以启动,具体方法为,到Android SDK下的tools目录下,在命令行方式下运行hierachyviewer即可:

D:\android-sdk\tools>hierarchyviewer.bat

点上你要选择的应用。

看别人程序的布局:

抠图功能:

双击任何一个地方就可以保存成psd。

实例对比:

<LinearLayout xmlns: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"
android:gravity="center"
android:background="@drawable/ccb_comm_bg0"
android:orientation="horizontal" >
<!-- android:background="@drawable/bg" -->
<com.example.health.util.CircleMenuLayout
android:id="@+id/id_menulayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="100dp"
android:background="@drawable/circle_bg3" > <RelativeLayout
android:id="@id/id_circle_menu_item_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" > <ImageView
android:layout_width="104.0dip"
android:layout_height="104.0dip"
android:layout_centerInParent="true"
android:background="@drawable/turnplate_center_unlogin" /> <ImageView
android:layout_width="116.0dip"
android:layout_height="116.0dip"
android:layout_centerInParent="true"
android:background="@drawable/turnplate_mask_unlogin_normal" />
</RelativeLayout>
</com.example.health.util.CircleMenuLayout> </LinearLayout>

要实现的效果:

TreeView:

点击某个视图,还可看见预览视图

抠图功能:

模仿版:

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff2f0eb"
android:orientation="vertical" > <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/height_top_bar"
android:layout_weight="0"
android:background="@color/common_top_bar_blue" > <TextView
android:id="@+id/ivTitleName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="登陆"
android:textColor="#ffffffff"
android:textSize="20.0sp" />
<ImageButton
android:id="@+id/ivTitleBtnLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="@drawable/top_icon_back" /> <TextView
android:id="@+id/ivTextViewRigh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="#ffffffff"
android:textSize="16.0sp"
android:text="忘记密码"
android:clickable="true" /> </RelativeLayout> <ViewFlipper
android:id="@+id/mainFlipper"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<LinearLayout
android:id="@+id/content1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:background="@color/login_background"
android:orientation="vertical" >
<LinearLayout
android:layout_margin="10dp"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal"
android:background="@drawable/inputbox_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/input_phone"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="6"
android:background="@null"
android:textSize="15.0sp"
android:hint="填写您的手机号">
<requestFocus />
</EditText>
</LinearLayout> <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginTop="15dp"
android:background="@drawable/inputbox_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/input_key"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="6"
android:background="@null"
android:textSize="15.0sp"
android:hint="输入您的登录密码"/>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/sendBtn"
style="@style/style_common_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/selector_common_btn"
android:text="登录" /> <TextView
android:id="@+id/regster_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:textColor="@color/common_top_bar_blue"
android:text="立即注册"
/>
</LinearLayout> <LinearLayout
android:id="@+id/content2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout> </ViewFlipper> </LinearLayout>

效果:

ViewFlipper的使用:

 regster_text.setOnClickListener(new OnClickListener() {

        @Override
public void onClick(View v) {
ib_menu.setVisibility(View.VISIBLE);
ivTitleName.setText("注册新账号");
vf.showNext();
ib_back.setVisibility(View.GONE);
}
}); ib_menu.setOnClickListener(new OnClickListener() { @Override
public void onClick(View v) {
ib_back.setVisibility(View.VISIBLE);
ivTitleName.setText("登录");
vf.showPrevious();
ib_menu.setVisibility(View.GONE); }
});

最新文章

  1. 解决Unity3D导出apk失败:Failed to re-package resources
  2. linux 安装samba
  3. MYSQL双主故障解决实例。
  4. git安装--linux下的安装
  5. Javascrip操作json方法
  6. NSFileManager 沙盒文件管理
  7. c# 二维码 显示
  8. paip.gch预编译头不生效的原因以及解决:
  9. echo向文件中写入
  10. MySQL_列值为null对索引的影响_实践
  11. Jupyter Notebooks 是数据科学/机器学习社区内一款非常流行的工具
  12. HDU4521
  13. windows git支持arc命令
  14. Hystrix参数配置
  15. Kotlin入门(1)搭建Kotlin开发环境
  16. [Android Studio] Using API of OpenCV DNN
  17. jdbc操作数据库并自动获取字段类型
  18. Go语言学习 总结一
  19. volatile关键字的介绍和使用
  20. vue项目创建步骤小结

热门文章

  1. (删)Java线程同步实现一:synchronzied和wait()/notify()
  2. Java Stream API性能测试
  3. 【iOS】7.4 定位服务-&gt;3.3 地图框架MapKit 功能3:3D视图
  4. jdk1.8新特性,还不知道的朋友还不看看,1.9都快出来了
  5. AngularJS学习笔记4
  6. vue2.0仿今日头条开源项目
  7. webmagic源码学习(一)
  8. jdk源码剖析五:JDK8-废弃永久代(PermGen)迎来元空间(Metaspace)
  9. 界面底部Tab实现
  10. caffe:使用C++来提取任意一张图片的特征(从内存读取数据)