• 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" }
    }
    
  • 相关阅读:
    字典的增删改查
    基础数据类型
    Linux程序优化实践
    Linuxt性能调优指南
    【MySQL】Percona Toolkits工具介绍及使用
    【MySQL】如何构建高性能MySQL系统?
    【MySQL】Event使用案例
    【MySQL】事件调度器 (Event Scheduler)
    【MySQL】mydumper工具介绍
    spu与sku的含义
  • 原文地址:https://www.cnblogs.com/hoge/p/5322866.html
Copyright © 2020-2023  润新知