完善应用介绍页UI风格
This commit is contained in:
		| @@ -1,8 +1,8 @@ | ||||
| #Created by .winboll/winboll_app_build.gradle | ||||
| #Sat Mar 29 09:33:15 GMT 2025 | ||||
| #Sat Mar 29 16:59:59 GMT 2025 | ||||
| stageCount=2 | ||||
| libraryProject=libaes | ||||
| baseVersion=15.2 | ||||
| publishVersion=15.2.1 | ||||
| buildCount=16 | ||||
| buildCount=25 | ||||
| baseBetaVersion=15.2.2 | ||||
|   | ||||
| @@ -5,23 +5,25 @@ package cc.winboll.studio.aes; | ||||
|  * @Date 2025/03/24 23:52:29 | ||||
|  * @Describe AES应用介绍窗口 | ||||
|  */ | ||||
| import android.app.Activity; | ||||
| import android.content.Context; | ||||
| import android.os.Bundle; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.LinearLayout; | ||||
| import androidx.appcompat.app.AppCompatActivity; | ||||
| import androidx.appcompat.widget.Toolbar; | ||||
| import cc.winboll.studio.libaes.winboll.APPInfo; | ||||
| import cc.winboll.studio.libaes.winboll.AboutView; | ||||
| import cc.winboll.studio.libappbase.GlobalApplication; | ||||
| import cc.winboll.studio.libappbase.winboll.IWinBollActivity; | ||||
| import android.app.Activity; | ||||
|  | ||||
| public class AboutActivity extends AppCompatActivity implements IWinBollActivity { | ||||
| public class AboutActivity extends WinBollActivity implements IWinBollActivity { | ||||
|  | ||||
|     public static final String TAG = "AboutActivity"; | ||||
|  | ||||
|     Context mContext; | ||||
|  | ||||
|     Toolbar mToolbar; | ||||
|      | ||||
|     @Override | ||||
|     public Activity getActivity() { | ||||
|         return this; | ||||
| @@ -36,17 +38,31 @@ public class AboutActivity extends AppCompatActivity implements IWinBollActivity | ||||
|     protected void onCreate(Bundle savedInstanceState) { | ||||
|         super.onCreate(savedInstanceState); | ||||
|         mContext = this; | ||||
|  | ||||
|         setContentView(R.layout.activity_about); | ||||
|          | ||||
|         mToolbar = findViewById(R.id.toolbar); | ||||
|         setSupportActionBar(mToolbar); | ||||
|         mToolbar.setSubtitle(TAG); | ||||
|         getSupportActionBar().setDisplayHomeAsUpEnabled(true); | ||||
|          | ||||
|         AboutView aboutView = CreateAboutView(); | ||||
|         // 在 Activity 的 onCreate 或其他生命周期方法中调用 | ||||
|         LinearLayout layout = new LinearLayout(this); | ||||
|         layout.setOrientation(LinearLayout.VERTICAL); | ||||
| //        LinearLayout layout = new LinearLayout(this); | ||||
| //        layout.setOrientation(LinearLayout.VERTICAL); | ||||
| //        // 创建布局参数(宽度和高度) | ||||
| //        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams( | ||||
| //            ViewGroup.LayoutParams.MATCH_PARENT, | ||||
| //            ViewGroup.LayoutParams.MATCH_PARENT | ||||
| //        ); | ||||
| //        addContentView(aboutView, params); | ||||
|          | ||||
|         LinearLayout layout = findViewById(R.id.aboutviewroot_ll); | ||||
|         // 创建布局参数(宽度和高度) | ||||
|         ViewGroup.LayoutParams params = new ViewGroup.LayoutParams( | ||||
|             ViewGroup.LayoutParams.MATCH_PARENT, | ||||
|             ViewGroup.LayoutParams.MATCH_PARENT | ||||
|         ); | ||||
|         addContentView(aboutView, params); | ||||
|         layout.addView(aboutView, params); | ||||
|  | ||||
|         GlobalApplication.getWinBollActivityManager().add(this); | ||||
|     } | ||||
|   | ||||
							
								
								
									
										50
									
								
								aes/src/main/java/cc/winboll/studio/aes/WinBollActivity.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								aes/src/main/java/cc/winboll/studio/aes/WinBollActivity.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| package cc.winboll.studio.aes; | ||||
|  | ||||
| import android.app.Activity; | ||||
| import android.os.Bundle; | ||||
| import androidx.appcompat.app.AppCompatActivity; | ||||
| import cc.winboll.studio.libaes.beans.AESThemeBean; | ||||
| import cc.winboll.studio.libaes.utils.AESThemeUtil; | ||||
| import cc.winboll.studio.libappbase.winboll.IWinBollActivity; | ||||
|  | ||||
| /** | ||||
|  * @Author ZhanGSKen@AliYun.Com | ||||
|  * @Date 2025/03/30 00:34:02 | ||||
|  * @Describe WinBoll 活动窗口通用基类 | ||||
|  */ | ||||
| public class WinBollActivity extends AppCompatActivity implements IWinBollActivity { | ||||
|  | ||||
|     public static final String TAG = "WinBollActivity"; | ||||
|  | ||||
|     protected volatile AESThemeBean.ThemeType mThemeType; | ||||
|  | ||||
|     @Override | ||||
|     public Activity getActivity() { | ||||
|         return this; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String getTag() { | ||||
|         return TAG; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     protected void onCreate(Bundle savedInstanceState) { | ||||
|         mThemeType = getThemeType(); | ||||
|         setThemeStyle(); | ||||
|         super.onCreate(savedInstanceState); | ||||
|     } | ||||
|  | ||||
|     AESThemeBean.ThemeType getThemeType() { | ||||
|         /*SharedPreferences sharedPreferences = getSharedPreferences( | ||||
|          SHAREDPREFERENCES_NAME, MODE_PRIVATE); | ||||
|          return AESThemeBean.ThemeType.values()[((sharedPreferences.getInt(DRAWER_THEME_TYPE, AESThemeBean.ThemeType.DEFAULT.ordinal())))]; | ||||
|          */ | ||||
|         return AESThemeBean.getThemeStyleType(AESThemeUtil.getThemeTypeID(getApplicationContext())); | ||||
|     } | ||||
|  | ||||
|     void setThemeStyle() { | ||||
|         //setTheme(AESThemeBean.getThemeStyle(getThemeType())); | ||||
|         setTheme(AESThemeUtil.getThemeTypeID(getApplicationContext())); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										22
									
								
								aes/src/main/res/layout/activity_about.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								aes/src/main/res/layout/activity_about.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout | ||||
| 	xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| 	xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
| 	android:orientation="vertical" | ||||
| 	android:layout_width="match_parent" | ||||
| 	android:layout_height="match_parent"> | ||||
|  | ||||
| 	<cc.winboll.studio.libaes.views.ASupportToolbar | ||||
| 		android:layout_width="match_parent" | ||||
| 		android:layout_height="wrap_content" | ||||
| 		android:id="@+id/toolbar"/> | ||||
|  | ||||
| 	<LinearLayout | ||||
| 		android:orientation="vertical" | ||||
| 		android:layout_width="match_parent" | ||||
| 		android:layout_height="0dp" | ||||
| 		android:layout_weight="1.0" | ||||
| 		android:id="@+id/aboutviewroot_ll"/> | ||||
|  | ||||
| </LinearLayout> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 ZhanGSKen
					ZhanGSKen