---
title: "Android 主配置文件"
author: "trinityblood"
date: "2012-12-03T19:18:24Z"
tags: []
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2012-12-03T19:18:24Z"
id: 1740481
url: "https://trinityblood.iteye.com/blog/1740481"
---

```xml

<activity
    android:name=".activity.ReadDetailActivity"
    android:configChanges="orientation|keyboard"
    android:launchMode="singleTask"
    android:theme="@android:style/Theme.Light.NoTitleBar"
    android:windowSoftInputMode="adjustPan" >
</activity>

```


android:windowSoftInputMode="adjustPan" 避免软件盘弹出的时候，挤压视图
android:configChanges="orientation|keyboard" 避免旋转屏幕将当前activity关闭，重新打开。