Android初级学习重点提取

本文详细介绍了 Android 开发中常用的 UI 组件,包括文本标签、文本框、按钮、单选框、复选框等,并提供了具体的 XML 示例代码,帮助开发者快速上手 Android 应用界面设计。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第一章    开发环境搭建略

第二章    android常用组件

1.       TextView  文本标签                                                                                       

2.      EditText   文本框、密码框                                                                                     

3.      Button    按钮                                                               

4.      RadioGroup  RadioButton单选框                        

5.      CheckBox 复选框

6.      Spinner 下拉列                                                                

7.      DatePicker                日期对话框                           

8.      TimePicker                时间对话框   

9.      ImageView               图片                                                 

10.  ImageButton    图片按钮                                                 

在main.xml中格式类似;例如:文本标签 输入框)

<TextView             以上10个及其他格式类似

    ……..

       …….

/>

图示:  主屏大小

 用户登录--------- TextView  文本标签  

 账号:--------- TextView  文本标签 

输入框)----------------EditText   文本框、密码框

密码:--------- TextView  文本标签  

输入框输入框)----------------EditText   文本框、密码框

自我介绍---------------TextView  文本标签

输入框输入框输入框)

输入框输入框 输入框)------------------EditText   文本框、密码框

输入框输入框 输入框)

确认取消----------------- Button    按钮  

Eg:

<?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:orientation="vertical" >


    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textColor="#FFFFFF"
        android:gravity="center"
        android:text="用户登录" />

<LinearLayout 
   android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
        <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="用户名:" />
<EditText 
   android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:lines="1"
   />
        
</LinearLayout>
<LinearLayout 
   android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
        <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="密码:" />
<EditText 
   android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:password="true"
        android:lines="1"
   />
        
</LinearLayout>
 
<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    >
    <Button 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="13px"
        android:textColor="#FFFFCC"
        android:text="确定"
        />
    <Button 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="13px"
        android:layout_marginLeft="50px"
        android:text="取消"
        />
</LinearLayout>
    
<TableLayout 
    android:layout_width="fill_parent"
         android:layout_height="fill_parent"
        
    >
    <TableRow 
       android:layout_width="fill_parent"
          android:layout_height="fill_parent"
        >
       <Button 
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="7"
           /> 
        <Button 
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="8"
           />
        <Button 
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="9"
           />
        <Button 
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="+"
           />
    </TableRow> 
         <TableRow 
       android:layout_width="fill_parent"
          android:layout_height="fill_parent"
        >
       <Button 
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="4"
           /> 
        <Button 
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="5"
           />
        <Button 
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="6"
           />
        <Button 
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:textSize="15px"
           android:text="-"
           />
    </TableRow>
  
</TableLayout>

</LinearLayout>


Frida是个轻量级so级别的hook框架,它可以帮助逆向人员对指定的进程的so模块进行分析。它主要提供了功能简单的python接口和功能丰富的js接口,使得hook函数和修改so编程化,值得一提的是接口中包含了主控端与目标进程的交互接口,由此我们可以即时获取信息并随时进行修改。使用frida可以获取进程的信息(模块列表,线程列表,库导出函数),可以拦截指定函数和调用指定函数,可以注入代码,总而言之,使用frida我们可以对进程模块进行手术刀式剖析。 它主要的工作方式是将脚本库注入到目标进程,在目标进程执行脚本。这里需要注意的是,它是将脚本库注入到已经启动的进程,但并不是说,对于进程初始化所做的动作,frida无能为力,frida提供了一个接口spawn,可以启动并暂时挂起进程,然后待我们布置好hook代码后再恢复进程运行,但是这个时间很短,大概2秒,也可能是我的使用姿势不对,求大佬指正。 此外,frida提供了相关的文档,但是frida官网提供的关于python接口的文档实在是少的可怜,连工具命令行的参数都没有,这点需要下载frida的python接口的源代码自己去分析了。值得高兴的一点是,Frida官网提供的js接口的文档稍微详细一些,并附有一些可喜的例子。 除了用于脚本编程的接口外,frida还提供了一些简单的工具,比如查看进程列表,追踪某个库函数等。 剩下就是关于frda学习路线了,Frida的学习还是蛮简单的,只需要了解两方面的内容: 1)主控端和目标进程的交互(message) 2)Python接口和js接口(查文档)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值