Android SwipeRefreshMultipleViews 项目教程
android-SwipeRefreshMultipleViewsMigrated:项目地址:https://gitcode.com/gh_mirrors/an/android-SwipeRefreshMultipleViews
1、项目的目录结构及介绍
android-SwipeRefreshMultipleViews/
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── build.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── SwipeRefreshMultipleViewsSample
├── build.gradle
├── proguard-rules.pro
└── src
└── main
├── AndroidManifest.xml
├── java
│ └── com
│ └── example
│ └── android
│ └── swiperefreshmultipleviews
│ ├── MainActivity.java
│ └── MultiSwipeRefreshLayout.java
└── res
├── drawable
├── layout
│ ├── activity_main.xml
│ └── content_main.xml
├── menu
├── mipmap-hdpi
├── mipmap-mdpi
├── mipmap-xhdpi
├── mipmap-xxhdpi
├── mipmap-xxxhdpi
└── values
├── colors.xml
├── dimens.xml
├── strings.xml
└── styles.xml
目录结构介绍
CONTRIBUTING.md: 贡献指南文件。LICENSE: 项目许可证文件。README.md: 项目说明文件。build.gradle: 顶层构建配置文件。gradle: Gradle 包装器目录。gradlew 和 gradlew.bat: Gradle 包装器脚本。settings.gradle: Gradle 设置文件。SwipeRefreshMultipleViewsSample: 示例应用的主要目录。
build.gradle: 示例应用的构建配置文件。proguard-rules.pro: ProGuard 规则文件。src: 源代码目录。
main: 主源代码目录。
AndroidManifest.xml: 应用清单文件。java: Java 源代码目录。
MainActivity.java: 主活动文件。MultiSwipeRefreshLayout.java: 自定义 SwipeRefreshLayout 文件。 res: 资源目录。
drawable: 可绘制资源目录。layout: 布局文件目录。menu: 菜单资源目录。mipmap: 应用图标资源目录。values: 值资源目录。
2、项目的启动文件介绍
MainActivity.java
package com.example.android.swiperefreshmultipleviews;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.swiperefreshmultipleviews">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android
android-SwipeRefreshMultipleViewsMigrated:项目地址:https://gitcode.com/gh_mirrors/an/android-SwipeRefreshMultipleViews