Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

实验三:Android资源使用编程 #3

Open
jiaohui opened this issue Feb 13, 2020 · 0 comments
Open

实验三:Android资源使用编程 #3

jiaohui opened this issue Feb 13, 2020 · 0 comments
Labels
Lab 实验要求

Comments

@jiaohui
Copy link
Collaborator

jiaohui commented Feb 13, 2020

实验目标

  1. 了解Android应用中各种资源的概念与使用方法;
  2. 掌握在Android应用中使用图片等资源的方法。

实验要求

  1. 在界面上显示至少一张图片(按照自己的题目添加);
  2. 提交res/drawable及图片使用的代码;
  3. 提交res/values, res/layout等其他代码;
  4. 将应用运行结果截图,放到实验报告中;
  5. 点击图片(或按钮)时,打开另一个Activity。

实验步骤(仅供参考,不是直接抄到实验报告)

  1. 提交代码的步骤与说明:
    https://github.com/hzuapps/android-labs-2020/blob/master/GitHub-lab.md
  2. Android 在TextView 中显示图片的4种方式:
    https://blog.csdn.net/u012724237/article/details/79010741

**注意:实验报告中原封不动抄上面2点的本次实验不及格。 **

实验提示

  1. 在界面中显示图片
<TextView  
    android:id="@+id/textview_01"  
    android:layout_width="wrap_content"  
    android:layout_height="wrap_content"  
    android:drawableTop="@drawable/ic_launcher"  
    android:text="hello_world" />  
  1. 打开另一个Activity
public class MainActivity extends Activity  implements OnClickListener {    
    ......    
    
    @Override    
    public void onClick(View v) {    
        if(v.equals(startButton)) {    
            // 另一个Activity的完整名称 = edu.androidlabs.soft123456(包名小写).Soft123456Activity(类名)
            Intent intent = new Intent("另一个Activity的完整名称");    
            startActivity(intent);    
        }    
    }    
}  

完整代码参考:https://github.com/hzuapps/android-labs-2020/tree/master/examples

  1. 根据自己的选题来设计动作。例如,聊天App中,点击头像显示个人信息;提交表单时,打击按钮显示提交结果;等等。

  2. 只提交自己创建的文件!!!

实验要点:提交 2 个文件

  • 1 个图片文件,放在 res/drawable/ 下面(图片名称一定要小写)
  • 1 个界面文件(XML),里面使用图片(@drawable/图片名称)
<ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/logo"/> 

已完成的好结果参考

@jiaohui jiaohui added the Lab 实验要求 label Feb 13, 2020
JieBro333 pushed a commit to JieBro333/android-labs-2020 that referenced this issue Oct 12, 2020
git push

git
git add
git commit -m#3
Chanlex added a commit to Chanlex/android-labs-2020 that referenced this issue Oct 12, 2020
Chanlex added a commit to Chanlex/android-labs-2020 that referenced this issue Oct 12, 2020
Chenweikang2 added a commit to Chenweikang2/android-labs-2020 that referenced this issue Oct 12, 2020
Playerlhh added a commit to Playerlhh/android-labs-2020 that referenced this issue Oct 12, 2020
Dwweryu added a commit to Dwweryu/android-labs-2020 that referenced this issue Oct 12, 2020
JieBro333 pushed a commit to JieBro333/android-labs-2020 that referenced this issue Oct 12, 2020
tillsunrise pushed a commit to tillsunrise/android-labs-2020 that referenced this issue Oct 12, 2020
account-lin added a commit to account-lin/android-labs-2020 that referenced this issue Oct 12, 2020
Xiaohuang-12 added a commit to Xiaohuang-12/android-labs-2020 that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
522090231 added a commit to 522090231/android-labs-2020 that referenced this issue Oct 12, 2020
jaydjxing added a commit to jaydjxing/android-labs-2020 that referenced this issue Oct 12, 2020
Hacker-LAM added a commit to Hacker-LAM/android-labs-2020 that referenced this issue Oct 12, 2020
Hacker-LAM added a commit to Hacker-LAM/android-labs-2020 that referenced this issue Oct 12, 2020
Hacker-LAM added a commit to Hacker-LAM/android-labs-2020 that referenced this issue Oct 12, 2020
Hacker-LAM added a commit to Hacker-LAM/android-labs-2020 that referenced this issue Oct 12, 2020
Garfield-zheng added a commit to Garfield-zheng/android-labs-2020 that referenced this issue Oct 12, 2020
zengsn added a commit that referenced this issue Oct 12, 2020
zhengtingting1 added a commit to zhengtingting1/android-labs-2020 that referenced this issue Dec 23, 2020
sentest05 added a commit to sentest05/android-labs-2020 that referenced this issue Dec 24, 2020
Dac0ngm1ng added a commit to Dac0ngm1ng/android-labs-2020 that referenced this issue Dec 24, 2020
SaTarU1IX pushed a commit to SaTarU1IX/android-labs-2020 that referenced this issue Dec 24, 2020
SaTarU1IX pushed a commit to SaTarU1IX/android-labs-2020 that referenced this issue Dec 24, 2020
SaTarU1IX pushed a commit to SaTarU1IX/android-labs-2020 that referenced this issue Dec 24, 2020
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Dec 24, 2020
zengsn added a commit that referenced this issue Dec 25, 2020
zengsn added a commit that referenced this issue Dec 25, 2020
zengsn added a commit that referenced this issue Dec 25, 2020
zengsn added a commit that referenced this issue Dec 25, 2020
jaydjxing added a commit to jaydjxing/android-labs-2020 that referenced this issue Dec 25, 2020
zcjzzf added a commit to zcjzzf/android-labs-2020 that referenced this issue Dec 25, 2020
1nnocent1 added a commit to 1nnocent1/android-labs-2020 that referenced this issue Dec 25, 2020
zengsn added a commit that referenced this issue Dec 26, 2020
zengsn added a commit that referenced this issue Dec 26, 2020
zengsn added a commit that referenced this issue Dec 26, 2020
zengsn added a commit that referenced this issue Dec 26, 2020
1nnocent1 added a commit to 1nnocent1/android-labs-2020 that referenced this issue Dec 27, 2020
1nnocent1 added a commit to 1nnocent1/android-labs-2020 that referenced this issue Dec 27, 2020
qxadc added a commit to qxadc/android-labs-2020 that referenced this issue Dec 28, 2020
zengsn added a commit that referenced this issue Jan 2, 2021
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Jan 8, 2021
第4、5次实验代码
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Jan 8, 2021
第4、5 次实验代码
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Jan 8, 2021
第4、5次实验代码
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Jan 8, 2021
第4、5次实验代码
JeesionChone added a commit to JeesionChone/android-labs-2020 that referenced this issue Jan 8, 2021
第五次实验的视频文件
Lcnc added a commit to Lcnc/android-labs-2020 that referenced this issue Jan 9, 2021
zengsn added a commit that referenced this issue Jan 10, 2021
Lcnc added a commit to Lcnc/android-labs-2020 that referenced this issue Jan 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Lab 实验要求
Projects
None yet
Development

No branches or pull requests

1 participant