Android Studio--学习系列(1)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wbh.hoge.crmapp"> <application
android:name=".base.SdCrmApplication"
android:allowBackup="true"
android:icon="@drawable/ic_icon"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@android:style/Theme.Light.NoTitleBar"> <activity android:name=".activity.main.MainActivity" >
<!--设置主窗体-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> <activity android:name=".activity.login.LoginActivity"></activity> </application> </manifest>
1、上面是设置主窗体;
2、调用其他窗体
@SuppressLint("ShowToast")
public class MainActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
init();
} @Override
protected void onNewIntent(Intent intent) {
//super.onNewIntent(intent);
init();
} public void init(){ startActivity(new Intent(getApplicationContext(),LoginActivity.class));
} }
3、Gradle.builde 这个好像还不怎么清楚;
// 声明是Android程序
apply plugin: 'com.android.application' android {
compileSdkVersion 23
buildToolsVersion "23.0.2" defaultConfig {
applicationId "com.wbh.hoge.crmapp"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
//移除lint检查的error
lintOptions {
abortOnError false
}
buildTypes {
release {
// 是否进行混淆
minifyEnabled false
// 混淆文件的位置
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {
// 编译libs目录下的所有jar包
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.umeng:fb:5.4.0'
compile 'com.jiechic.library:xUtils:2.6.14'
}
repositories {
jcenter()
maven { url "https://raw.githubusercontent.com/umeng/mvn-repo-umeng/master/repository" }
}
Android Studio--学习系列(1)的更多相关文章
- Android Studio 学习 - 基本控件的使用;Intent初学
Android Studio学习第三天. 今天主要学习 1. RadioButton.CheckBox.RatingBar.SeekBar等基础控件的使用. 结合Delphi中相类似的控件,在这些基本 ...
- 【Android Studio探索之路系列】之中的一个:Android Studio开篇
作者:郭孝星 微博:郭孝星的新浪微博 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells github:https://github.co ...
- 【Android Studio探索之路系列】之六:Android Studio加入依赖
作者:郭孝星 微博:郭孝星的新浪微博 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells github:https://github.co ...
- Android Studio 学习笔记(一)环境搭建、文件目录等相关说明
Android Studio 学习笔记(一)环境搭建.文件目录等相关说明 引入 对APP开发而言,Android和iOS是两大主流开发平台,其中区别在于 Android用java语言,用Android ...
- 【Android Studio】studio学习系列(一) 从eclipse导入project
Android google官方出的IDE android studio 一直都在走bate版本号,尽管如此,总认为它比ADT更加靠谱.所以我也想用studio来开发滴.可项目一直都是eclipse的 ...
- Android Studio 学习 - 程序安装
痛定思痛,从今天开始专心学习AndriodStudio.希望以此为契机,把Java学扎实.更希望自己能坚持下去,不要半途而废. 记录一些日常的工作以及碰到的问题,权当勉励自己.荀子曰:吾尝终日而思矣, ...
- Android Studio学习笔记
转:http://stormzhang.com/devtools/2014/11/25/android-studio-tutorial1 背景 相信大家对Android Studio已经不陌生了,An ...
- Android Studio 学习 - HelloWorld
今天是学习Android Studio的第2天,加油! 1. 首先要记录下使用Android Studio的一个代码自动完成的功能.平常基本上用Delphi,乍一换工具,各种不习惯,或者说不熟悉.按照 ...
- Android Studio 学习笔记(1)
最近从Eclipse转到Android Studio IDE,很多东西需要学习,本文是个记录. 项目结构 在Anroid Studio 中,一个Project 包括多个Module,每个Module下 ...
- Android Studio 学习笔记1.1 创建自己的第一个安卓项目并且打包APK
自从上一次安装完安卓开发工具Android Studio后抽时间看视屏尝试编写自己的第一个安卓项目约两周的时间 每天下班后会花上1~2小时的时间去学习 目前的成果如下:次元宅的我.apk 嘛 总而 ...
随机推荐
- HDU 1109
http://acm.hdu.edu.cn/showproblem.php?pid=1109 一个范围内给一堆点,求到这些点的最短距离最大 模拟退火,温度是步长 #include <iostre ...
- Http方法:Get请求与Post请求的区别
Get是向服务器发索取数据的一种请求,而Post是向服务器提交数据的一种请求Get是获取信息,而不是修改信息,类似数据库查询功能一样,数据不会被修改Get请求的参数会跟在url后进行传递,请求的数据会 ...
- LabVIEW串口通信的一个例子-串口"示波器"
1.程序界面:<ignore_js_op> 功能介绍:左边上方串口接收区,下方为串口字符发送区.右方为一个波形图表,在程序内部每次将串口发送过来的数据,以f%格式化,显示在波形图表上.按钮 ...
- openvswitch——mac和vlan learning for ingress port
对于普通的switch,都会有这个学习的过程,当一个包到来的时候,由于包里面有MAC,VLAN Tag,以及从哪个口进来的这个信息.于是switch学习后,维护了一个表格port –> MAC ...
- Codeforces Round #366 (Div. 2) C 模拟queue
C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard input outpu ...
- ✡ leetcode 162. Find Peak Element --------- java
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ ...
- LeetCode(169)Majority Element and Majority Element II
一个数组里有一个数重复了n/2多次,找到 思路:既然这个数重复了一半以上的长度,那么排序后,必然占据了 a[n/2]这个位置. class Solution { public: int majorit ...
- LeetCode(228) Summary Ranges
Given a sorted integer array without duplicates, return the summary of its ranges. For example, give ...
- Android——复选按钮和开关按钮
复选按钮和开关按钮代码如下: <LinearLayout android:layout_width="match_parent" android:layout_height= ...
- Python Tornado
按照http://www.tornadoweb.cn/所提供的方法下载安装后编写如下程序: import tornado.ioloop import tornado.web class MainHan ...