一、隐式跳转(自定义界面)

界面层:

  <Button
android:id="@+id/sencond_contact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跳转至second1界面隐式"
android:onClick="click_jump_sencond_yinshi"
/>

java层

public void click_jump_sencond_yinshi(View v)
{
Intent intent=new Intent();
intent.setAction("cn.rfvip.yinshijiemian");//次名为清单中的 <intent-filter > <action android:name="cn.rfvip.yinshijiemian"/>
//跳转
startActivity(intent);
}

清单层(AndroidManifest.xml)

  <application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="cn.rfvip.jumpActivity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="cn.rfvip.jumpActivity.second">
<intent-filter >
<action android:name="cn.rfvip.yinshijiemian"/>
<category android:name="android.intent.category.DEFAULT"/></intent-filter> </activity>
</application>

二、显示跳转(自定义界面)

界面层:

  <Button
android:id="@+id/sencond_contact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跳转至second界面显示"
android:onClick="click_sencond_contact"
/>

java 层:

//显示跳转
public void click_sencond_contact(View v)
{
Intent intent=new Intent();
intent .setClass(this, cn.rfvip.jumpActivity.second.class);//此处可以省略包名
//intent.setClass(this, second.class);
//跳转
startActivity(intent); }

清单层(AndroidManifest.xml)(注意权限)

 <application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="cn.rfvip.jumpActivity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="cn.rfvip.jumpActivity.second">
</activity>
</application>

三、隐式跳转系统外部应用

界面层

 <Button
android:id="@+id/main_callphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="click_main_callphone"
android:text="隐式跳转系统拨号"
/>
<Button

java层

//隐式跳转打电话
public void click_main_callphone(View v)
{
Intent intent=new Intent();
intent.setAction(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:10000"));
//跳转
startActivity(intent);
}

清单层(AndroidManifest.xml)(注意权限)

android 入门 007(界面跳转)的更多相关文章

  1. Android之Activity界面跳转--生命周期方法调用顺序

    这本是一个很基础的问题,很惭愧,很久没研究这一块了,已经忘得差不多了.前段时间面试,有面试官问过这个问题.虽然觉得没必要记,要用的时候写个Demo,打个Log就清楚了.但是今天顺手写了个Demo,也就 ...

  2. Android 手机卫士--设置界面&功能列表界面跳转逻辑处理

    在<Android 手机卫士--md5加密过程>中已经实现了加密类,这里接着实现手机防盗功能 本文地址:http://www.cnblogs.com/wuyudong/p/5941959. ...

  3. Android activity界面跳转动画

    实现activity界面跳转动画 1.在startActivity方法之后加入: overridePendingTransition(R.anim.pull_in_right, R.anim.pull ...

  4. Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面

    现在开发中的功能需要直接跳转到拨号.联系人.短信界面等等,查找了很多资料,自己整理了一下. 1.跳转到拨号界面,代码如下: 1)直接拨打 Intent intentPhone = new Intent ...

  5. Android基础-系统架构分析,环境搭建,下载Android Studio,AndroidDevTools,Git使用教程,Github入门,界面设计介绍

    系统架构分析 Android体系结构 安卓结构有四大层,五个部分,Android分四层为: 应用层(Applications),应用框架层(Application Framework),系统运行层(L ...

  6. Android原生和H5交互;Android和H5混合开发;WebView点击H5界面跳转到Android原生界面。

    当时业务的需求是这样的,H5有一个活动商品列表的界面,IOS和Android共用这一个界面,点击商品可以跳转到Android原生的商品详情界面并传递商品ID:  大概就是点击H5界面跳转到Androi ...

  7. Android——实现欢迎界面的自动跳转(转)

    Android实现欢迎界面的自动跳转,就是打开某一个安卓手机应用,出现的欢迎界面停留几秒钟,自动进入应用程序的主界面.在网上看到很多种实现办法,但是感觉这种方法还是比较简单的. 在onCreate里设 ...

  8. 界面跳转+Android Studio Button事件的三种方式

    今天学习界面跳转 java类总是不能新建成功 看了网上教程 (20条消息) 关于android studio无法创建类或者接口问题的解决方法_qq_39916160的博客-CSDN博客 可以新建了 但 ...

  9. iOS界面跳转的一些优化方案

    原文地址: http://blog.startry.com/2016/02/14/Think-Of-UIViewController-Switch/ iOS界面跳转的一些优化方案 App应用程序开发, ...

随机推荐

  1. monkey测试(转)

    一.Monkey测试简介Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕.滑动Trackball.按键等操作来对设备上的程序进行压力测试,检测程序多久的时 ...

  2. sql 中实现打乱数据的排序

    sql 中实现打乱数据的排序    order by NEWID()就实现了数据的打乱 

  3. Unable to find the wrapper "https"错误的解决办法

    PHP.ini默认配置下,用file_get_contents读取https的链接,就会如下错误:Warning: fopen() [function.fopen]: Unable to find t ...

  4. access调用联系

    using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; us ...

  5. 【sublime】解决汉字输入的办法——InputHelper;在sublime中输入汉字==》InputHelper方法

    手工安装办法: cd ~/.config/sublime-text-2/Packages  #如果是sublime3就改一下 git clone https://github.com/xgenvn/I ...

  6. 解决PHP在IE浏览器下载文件,中文文件名乱码问题

    前提:我们网站所有文件全部使用的是UTF-8 NO BOM的编码方式 1.找测试重现.360浏览器下载的呵呵,果然文件名是乱码.再请测试在ie浏览器下测试.IE9,8,7也全部是乱码.查看编码就是UT ...

  7. 似是而非的k=sqrt(n)

    //题目:输入一个大于3的整数n,判定它是否为素数(prime,又称质数)#include <stdio.h>#include <math.h>int main(){int n ...

  8. Sqlserver Sql Agent Job 只能同时有一个实例运行

    Sqlserver Sql Agent中的Job默认情况下只能有一个实例在运行,也就是说假如你的Sql Agent里面有一个正在运行的Job叫"Test Job",如果你现在再去启 ...

  9. NOIP200503采药

                          NOIP200503采药 [问题描述] 辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师.为此,他想拜附近最有威望的医师为师.医师为了判断他的资质, ...

  10. 华为项目管理10大模板Excel版(可直接套用_非常实用)

    项目管理是管理学的一个分支学科 ,对项目管理的定义是:指在项目活动中运用专门的知识.技能.工具和方法,使项目能够在有限资源限定条件下,实现或超过设定的需求和期望的过程.项目管理是对一些与成功地达成一系 ...