This commit is contained in:
zengfantian 2015-01-25 14:18:16 +08:00
commit 2ef209b1e3
21 changed files with 60 additions and 29 deletions

View File

@ -89,23 +89,37 @@
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
android:theme="@android:style/Theme.Holo.Light" >
<!-- 在本应用中导入需要使用的包放在application里面activity外面 -->
<uses-library android:name="android.test.runner" />
<!-- 配置程序启动界面 -->
<activity android:name=".Launcher">
<activity android:name=".Launcher"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- 程序主界面 -->
<activity
android:name=".sample.MainActivity"
android:label="@string/MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<!-- android:windowSoftInputMode="adjustPan" 键盘就会覆盖屏幕 -->
<!-- android:windowSoftInputMode="stateVisible|adjustResize" 屏幕整体上移 -->
<!-- 引导界面 -->
<activity
android:name=".common.GuideActivity"
android:label="GuideActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" >
@ -136,18 +150,6 @@
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<!-- 程序主界面 -->
<activity
android:name=".sample.MainActivity"
android:label="MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<!-- android:windowSoftInputMode="adjustPan" 键盘就会覆盖屏幕 -->
<!-- android:windowSoftInputMode="stateVisible|adjustResize" 屏幕整体上移 -->
<!-- 底部泡泡菜单 -->
<activity
android:name=".sample.popupwindow.PopDialogMenuActivity"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -2,7 +2,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
android:background="@color/white"
tools:context=".Launcher" >
<ImageView

View File

@ -2,12 +2,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
android:background="@color/white"
tools:context=".Launcher" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<com.zftlive.android.view.imageindicator.ImageIndicatorView
android:id="@+id/guide_indicate_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:src="@drawable/ic_launcher"
android:contentDescription="@string/app_name"

View File

@ -2,7 +2,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
android:background="@color/white"
tools:context=".Launcher" >
<ListView

View File

@ -2,14 +2,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
android:background="@color/white"
tools:context=".Launcher" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/ic_launcher"
android:src="@drawable/share"
android:contentDescription="@string/app_name"
/>

View File

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
android:background="@color/white"
android:orientation="vertical" >
<LinearLayout
@ -16,7 +16,8 @@
android:id="@+id/et_phone"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="2.0" />
android:layout_weight="2.0"
android:background="@null" />
<Button
android:id="@+id/btn_gain_smscode"
@ -29,7 +30,8 @@
<EditText
android:id="@+id/et_phone_code"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:background="@null" />
<Button
android:id="@+id/btn_validate"

View File

@ -1,5 +1,6 @@
<resources>
<string name="app_name">zftlive</string>
<string name="sms_timer">获取手机验证码(%1$s</string>
<string name="app_name">攻城师</string>
<string name="MainActivity">Android样例锦集</string>
</resources>

View File

@ -0,0 +1,3 @@
<resources>
<string name="sms_timer">获取手机验证码(%1$s</string>
</resources>

View File

@ -23,4 +23,11 @@
<item name="android:windowExitAnimation">@anim/pop_menu_out_anim</item>
</style>
<style name="theme_fullScreen">
<!-- 设置无标题 -->
<item name="android:windowNoTitle">true</item>
<!-- 设置全屏 -->
<item name="android:windowFullscreen">true</item>
</style>
</resources>

View File

@ -27,7 +27,7 @@ public class Launcher extends BaseActivity {
//添加动画效果
AlphaAnimation animation = new AlphaAnimation(0.3f, 1.0f);
animation.setDuration(1000);
animation.setDuration(2000);
animation.setAnimationListener(new AnimationListener() {
@Override

View File

@ -5,6 +5,7 @@ import android.view.View;
import com.zftlive.android.R;
import com.zftlive.android.base.BaseActivity;
import com.zftlive.android.view.imageindicator.ImageIndicatorView;
/**
* 引导界面
@ -14,6 +15,7 @@ import com.zftlive.android.base.BaseActivity;
*/
public class GuideActivity extends BaseActivity {
private ImageIndicatorView imageIndicatorView;
@Override
public int bindLayout() {
return R.layout.activity_guide;
@ -21,12 +23,25 @@ public class GuideActivity extends BaseActivity {
@Override
public void initView(View view) {
imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view);
//滑动监听器
imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
@Override
public void onPosition(int position, int totalCount) {
if(position==totalCount){
finish();
}
}
});
}
@Override
public void doBusiness(Context mContext) {
final Integer[] resArray = new Integer[] { R.drawable.guide01, R.drawable.guide02, R.drawable.guide03 };
imageIndicatorView.setupLayoutByDrawable(resArray);
imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE);
imageIndicatorView.show();
}
@Override