• 我第一次上传自己的Android作品——自己的名片夹



     图标:

    首页:

    QQ页:

    一Activity:

    Activity:

      1 package com.xmb.xmb;
      2 
      3 
      4 import android.os.Bundle;
      5 import android.app.Activity;
      6 import android.content.Intent;
      7 import android.view.Menu;
      8 import android.view.MenuItem;
      9 import android.view.View;
     10 import android.view.View.OnClickListener;
     11 import android.widget.Button;
     12 import android.widget.Toast;
     13 import android.support.v4.app.NavUtils;
     14 
     15 public class MainActivity extends Activity {
     16     private Button bt1,bt2,bt3,bt4,bt5;
     17     @Override
     18     public void onCreate(Bundle savedInstanceState) {
     19         super.onCreate(savedInstanceState);
     20         setContentView(R.layout.activity_main);
     21     
     22         bt1=(Button)findViewById(R.id.bt1);
     23         bt1.setOnClickListener(new OnClickListener()
     24         {
     25             
     26             @Override
     27             public void onClick(View arg0)
     28             {
     29                 Intent intent=new Intent();
     30                 intent.setClass(MainActivity.this,SenAct.class);
     31                 //intent.putExtra("str","qq");
     32                 
     33                 startActivity(intent);
     34                 
     35             }
     36         });
     37         bt2=(Button)findViewById(R.id.bt2);
     38         bt2.setOnClickListener(new OnClickListener()
     39          {
     40              
     41              @Override
     42              public void onClick(View arg0)
     43              {
     44                  Intent intent=new Intent();
     45                 intent.setClass(MainActivity.this,ThiAct.class);
     46                 
     47                 
     48                 startActivity(intent);
     49                  
     50              }
     51          });
     52         bt3=(Button)findViewById(R.id.bt3);
     53         bt3.setOnClickListener(new OnClickListener()
     54          {
     55              
     56              @Override
     57              public void onClick(View arg0)
     58              {
     59                  Intent intent=new Intent();
     60                 intent.setClass(MainActivity.this,ForAct.class);
     61                 startActivity(intent);
     62                  
     63              }
     64          });
     65         bt4=(Button)findViewById(R.id.bt4);
     66         bt4.setOnClickListener(new OnClickListener()
     67          {
     68              
     69              @Override
     70              public void onClick(View arg0)
     71              {    
     72                  Intent intent=new Intent();
     73                 intent.setClass(MainActivity.this,FirAct.class);
     74                 startActivity(intent);
     75                      
     76                  
     77              }
     78          });
     79         bt5=(Button)findViewById(R.id.bt5);
     80         bt5.setOnClickListener(new OnClickListener()
     81          {
     82              
     83              @Override
     84              public void onClick(View arg0)
     85              {
     86                  Toast.makeText(MainActivity.this,"冼敏兵版权所有,冒仿必究。最终解释权归冼敏兵所有。",Toast.LENGTH_LONG).show();
     87                  
     88              }
     89          });
     90         
     91     }
     92     
     93     
     94     
     95     @Override
     96     public boolean onCreateOptionsMenu(Menu menu) {
     97         getMenuInflater().inflate(R.menu.activity_main, menu);
     98         return true;
     99     }
    100 
    101     
    102 }
    FirAct
     1 package com.xmb.xmb;
     2 
     3 import android.app.Activity;
     4 import android.os.Bundle;
     5 
     6 public class FirAct extends Activity
     7 {
     8     protected void onCreate(Bundle savedInstanceState) {
     9         super.onCreate(savedInstanceState);
    10         setContentView(R.layout.bbbb);
    11     }
    12 }
     1 package com.xmb.xmb;
     2 
     3 
     4 
     5 import android.annotation.SuppressLint;
     6 import android.app.Activity;
     7 import android.os.Bundle;
     8 import android.widget.*;
     9 @SuppressLint("ParserError")
    10 public class SenAct extends Activity
    11 {
    12 
    13     protected void onCreate(Bundle savedInstanceState) {
    14         super.onCreate(savedInstanceState);
    15         setContentView(R.layout.b);
    16     }
    17 }
     1 package com.xmb.xmb;
     2 
     3 import android.app.Activity;
     4 import android.os.Bundle;
     5 
     6 public class ThiAct extends Activity
     7 {
     8     protected void onCreate(Bundle savedInstanceState) {
     9         super.onCreate(savedInstanceState);
    10         setContentView(R.layout.bb);
    11     }
    12 }
     1 package com.xmb.xmb;
     2 
     3 import android.app.Activity;
     4 import android.os.Bundle;
     5 
     6 public class ForAct extends Activity
     7 {
     8     protected void onCreate(Bundle savedInstanceState) {
     9         super.onCreate(savedInstanceState);
    10         setContentView(R.layout.bbb);
    11     }
    12 }
     1 package com.xmb.xmb;
     2 
     3 import android.app.Activity;
     4 import android.os.Bundle;
     5 
     6 public class FirAct extends Activity
     7 {
     8     protected void onCreate(Bundle savedInstanceState) {
     9         super.onCreate(savedInstanceState);
    10         setContentView(R.layout.bbbb);
    11     }
    12 }
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3    android:orientation="vertical"
     4     android:layout_width="fill_parent"
     5     android:layout_height="fill_parent" 
     6     android:background="@drawable/gdou_2"
     7     >
     8   <TextView 
     9     android:layout_width="fill_parent"
    10     android:layout_height="wrap_content"
    11     android:textSize="100sp"
    12     android:textColor="#00FF00"
    13     android:focusable="true"
    14     android:ellipsize="marquee"
    15     android:marqueeRepeatLimit="marquee_forever"
    16     android:focusableInTouchMode="true"
    17     android:singleLine="true"
    18     android:text="欢迎使用名片夹"
    19      />
    20  <TextView 
    21     android:layout_width="fill_parent"
    22     android:layout_height="wrap_content"
    23     android:textSize="20sp"
    24     android:textColor="#0000FF"
    25     android:text="请选择点击进入》》"
    26      />
    27 
    28  
    29  <TableLayout 
    30             android:layout_width="fill_parent"
    31             android:layout_height="fill_parent"
    32             android:stretchColumns="1"
    33             >
    34    <TableRow>
    35        
    36        <Button
    37           android:id="@+id/bt1"
    38            android:text="联系电话"
    39            />
    40        <Button
    41            android:id="@+id/bt2"
    42            android:text="QQ号码"
    43            />
    44 
    45        <Button
    46            android:id="@+id/bt3"
    47            android:text="家庭地址" />
    48 
    49        </TableRow>
    50        <TableRow>
    51        
    52        <Button
    53            android:id="@+id/bt4"
    54            android:text="新浪微博"
    55            />
    56         <Button
    57             android:id="@+id/bt5"
    58            android:text="关于版权"
    59            />
    60       
    61        </TableRow>
    62 
    63 </TableLayout>
    64    
    65  </LinearLayout>    
    66           
    67            
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3   
     4     android:layout_width="fill_parent"
     5     android:layout_height="fill_parent"
     6      android:orientation="vertical" 
     7     >
     8     <TextView 
     9        android:layout_width="fill_parent"
    10        android:layout_height="wrap_content"
    11        android:textSize="30sp"
    12        
    13        android:text="中国移动动感在线"
    14        
    15         />
    16    <TextView 
    17     android:layout_width="fill_parent"
    18     android:layout_height="wrap_content"
    19     android:textSize="40sp"
    20     android:textColor="#0000FF"
    21     android:textStyle="bold"
    22     android:autoLink="all"
    23     android:text="13763060275"
    24      />
    25   </LinearLayout>
    26     
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3   
     4     android:layout_width="fill_parent"
     5     android:layout_height="fill_parent"
     6      android:orientation="vertical" 
     7     >
     8     <TextView 
     9     android:layout_width="fill_parent"
    10     android:layout_height="wrap_content"
    11     android:textSize="20sp"
    12     android:textColor="#0000FF"
    13     
    14    
    15     android:text="QQ号码:"
    16     
    17      />
    18     <EditText 
    19         android:layout_width="fill_parent"
    20         android:layout_height="wrap_content"
    21         android:inputType="number"
    22         android:singleLine="false"
    23         android:drawableLeft="@drawable/qq"
    24         />
    25    <TextView 
    26     android:layout_width="fill_parent"
    27     android:layout_height="wrap_content"
    28     android:textSize="30sp"
    29     android:textColor="#FFFFFF"
    30     
    31    
    32     android:text="807443969"
    33      />
    34    
    35   </LinearLayout>
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3   
     4     android:layout_width="fill_parent"
     5     android:layout_height="fill_parent"
     6      android:orientation="vertical"
     7      android:background="@drawable/jm" 
     8     >
     9      <TextView 
    10     android:layout_width="fill_parent"
    11     android:layout_height="wrap_content"
    12     android:textSize="20sp"
    13     android:textColor="#FFFFFF"
    14     
    15    
    16     android:text="家庭住址:"
    17      />
    18    <TextView 
    19     android:layout_width="fill_parent"
    20     android:layout_height="wrap_content"
    21     android:textSize="30sp"
    22     android:textColor="#0000FF"
    23     
    24   
    25     android:text="广东省江门鹤山市共和镇平汉村民委员会山顶村142号"
    26      />
    27   </LinearLayout>
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3   
     4     android:layout_width="fill_parent"
     5     android:layout_height="fill_parent"
     6      android:orientation="vertical" 
     7     >
     8      <TextView 
     9     android:layout_width="fill_parent"
    10     android:layout_height="wrap_content"
    11     android:textSize="20sp"
    12     android:textColor="#FFFFFF"
    13     android:textStyle="bold"
    14    
    15     android:text="新浪微博链接:"
    16      />
    17    <TextView 
    18     android:layout_width="fill_parent"
    19     android:layout_height="wrap_content"
    20     android:textSize="30sp"
    21     android:textColor="#0000FF"
    22     
    23     android:autoLink="all"
    24     android:text="http://weibo.com/gtr7"
    25      />
    26   </LinearLayout>
  • 相关阅读:
    Istio流量管理实践之(3): 基于Istio实现流量对比分析
    15分钟在笔记本上搭建 Kubernetes + Istio开发环境
    阿里云 Aliplayer高级功能介绍(九):自动播放体验
    阿里云 Aliplayer高级功能介绍(八):安全播放
    阿里云 Aliplayer高级功能介绍(七):多分辨率
    统计报告称中国大学导师最多同时带47名博士生
    RHEL5 挂载 NTFS 分区
    2008级计算机应用 嵌入式方向课表(前10周)
    硬盘安装CentOS-5.5
    slax
  • 原文地址:https://www.cnblogs.com/xmb7/p/2680835.html
Copyright © 2020-2023  润新知