-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
juhonggang
committed
Dec 16, 2018
1 parent
0b5fe60
commit 11f8ad3
Showing
26 changed files
with
412 additions
and
75 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
BaseComponentDemo/src/main/java/com/sxu/module1/ShowMagicDialogTestService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.sxu.module1; | ||
|
||
import android.app.Service; | ||
import android.content.Intent; | ||
import android.os.Handler; | ||
import android.os.IBinder; | ||
import android.os.Message; | ||
import android.support.annotation.Nullable; | ||
import android.view.Gravity; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import com.sxu.basecomponent.uiwidget.MagicDialog; | ||
import com.sxu.baselibrary.commonutils.DisplayUtil; | ||
|
||
/******************************************************************************* | ||
* Description: | ||
* | ||
* Author: Freeman | ||
* | ||
* Date: 2018/12/16 | ||
* | ||
* Copyright: all rights reserved by Freeman. | ||
*******************************************************************************/ | ||
public class ShowMagicDialogTestService extends Service { | ||
|
||
private Handler handler = new Handler() { | ||
@Override | ||
public void handleMessage(Message msg) { | ||
super.handleMessage(msg); | ||
TextView textView = new TextView(ShowMagicDialogTestService.this); | ||
textView.setGravity(Gravity.CENTER); | ||
textView.setMinimumHeight(DisplayUtil.dpToPx(100)); | ||
textView.setText("测试全局弹框"); | ||
MagicDialog.show(ShowMagicDialogTestService.this, textView, false); | ||
handler.sendEmptyMessageDelayed(0, 4000); | ||
} | ||
}; | ||
|
||
@Nullable | ||
@Override | ||
public IBinder onBind(Intent intent) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int onStartCommand(Intent intent, int flags, int startId) { | ||
handler.sendEmptyMessageDelayed(0, 3000); | ||
return super.onStartCommand(intent, flags, startId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:drawable="@drawable/splash_bg_image"/> | ||
<item android:top="180dp"> | ||
<bitmap android:src="@drawable/slogan" | ||
android:gravity="center_horizontal|top"/> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
<FrameLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingLeft="24dp" | ||
android:paddingRight="24dp" | ||
android:gravity="center" | ||
android:orientation="vertical"> | ||
android:layout_height="match_parent"> | ||
<com.sxu.imageloader.WrapImageView | ||
android:id="@+id/ad_image" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginBottom="80dp"/> | ||
<LinearLayout | ||
android:id="@+id/bottom_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="80dp" | ||
android:gravity="center" | ||
android:layout_gravity="center_horizontal|bottom" | ||
android:orientation="vertical"> | ||
<ImageView | ||
android:id="@+id/name_icon" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal|bottom" | ||
android:src="@drawable/app_white_name_icon"/> | ||
<TextView | ||
android:id="@+id/right_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal|bottom" | ||
android:text="—— 网易公司版权所有 ©2018 ——" | ||
android:textSize="10dp" | ||
android:textColor="@color/white"/> | ||
</LinearLayout> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textSize="@dimen/fs_17" | ||
android:text="这是启动页" | ||
android:textStyle="bold"/> | ||
|
||
<TextView | ||
android:id="@+id/desc_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="18dp" | ||
android:text="将启动页的主题背景设置成和主题页相同的背景,即可解决黑白屏问题,具体可参考:"/> | ||
|
||
</LinearLayout> | ||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.