wjc
2023-06-02 facb0d0c253f733e11b2d04a95fc83bfdaff1f71
2023年06月02日11:58:43

第一次创建
93个文件已添加
3343 ■■■■■ 已修改文件
app/.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/build.gradle 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/proguard-rules.pro 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/androidTest/java/com/example/photovoltaic/ExampleInstrumentedTest.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/AndroidManifest.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/HDLApp.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/base/BaseActivity.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/base/BaseFragment.java 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/base/CustomBaseActivity.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/base/CustomBaseFragment.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/enums/ShowErrorMode.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/listener/BaseView.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/other/HdlLogLogic.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/other/HdlThreadLogic.java 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/Login/HomeLoginActivity.java 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/StartActivity.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/adapter/HouseInfoAdapter.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/bean/HouseInfoBean.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/home/HouseListFragment.java 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/home/MeFragment.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/ui/home/MyPowerStationActivity.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/utils/AppManagerUtils.java 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/photovoltaic/utils/FlashLightUtils.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable-v24/ic_launcher_foreground.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/add.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/asregards.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/checked.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/clear.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/down.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/hide.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/house_list_line_parent_bg.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/ic_launcher_background.xml 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/message.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/more.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/next.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/region.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/selected.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/selectedme.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/selectedpowerstation.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/set.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/show.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/state_06b92a.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/state_b9b9b9.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/state_e34343.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/state_ffb300.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/unchecked_btn.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/unselected.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/unselectedme.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/unselectedpowerstation.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/yesandnocheck.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/yesandnoselected.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_home_login.xml 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_my_power_station.xml 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_start.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_house_list.xml 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_me.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_me_line.xml 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/frgment_house_list_line.xml 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/home_bottom_line.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/toolbar_top_view_44.xml 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/toolbar_top_view_52.xml 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-hdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-mdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/navigation/nav_graph.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-land/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-night/themes.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-w1240dp/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-w600dp/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/attrs.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/colors.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/dimens.xml 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/styles.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/themes.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/test/java/com/example/photovoltaic/ExampleUnitTest.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
build.gradle 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradle.properties 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradle/wrapper/gradle-wrapper.jar 补丁 | 查看 | 原始文档 | blame | 历史
gradle/wrapper/gradle-wrapper.properties 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradlew 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradlew.bat 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
local.properties 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
settings.gradle 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/.gitignore
New file
@@ -0,0 +1 @@
/build
app/build.gradle
New file
@@ -0,0 +1,46 @@
plugins {
    id 'com.android.application'
}
android {
    compileSdk 32
    defaultConfig {
        applicationId "com.example.photovoltaic"
        minSdk 23
        targetSdk 32
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildFeatures {
        viewBinding true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'org.greenrobot:eventbus:3.0.0'
}
app/proguard-rules.pro
New file
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
app/src/androidTest/java/com/example/photovoltaic/ExampleInstrumentedTest.java
New file
@@ -0,0 +1,26 @@
package com.example.photovoltaic;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
        assertEquals("com.example.photovoltaic", appContext.getPackageName());
    }
}
app/src/main/AndroidManifest.xml
New file
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.photovoltaic" >
    <application
        android:name=".HDLApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.PhotovoltaicDebug" >
        <activity
            android:name=".ui.home.MyPowerStationActivity"
            android:exported="false" />
        <activity
            android:name=".ui.Login.HomeLoginActivity"
            android:exported="false" />
        <activity
            android:name=".ui.StartActivity"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="design_height_in_dp"
            android:value="812" />
        <meta-data
            android:name="design_width_in_dp"
            android:value="375" />
    </application>
</manifest>
app/src/main/java/com/example/photovoltaic/HDLApp.java
New file
@@ -0,0 +1,47 @@
package com.example.photovoltaic;
import android.app.Application;
import java.util.HashMap;
import java.util.Objects;
public class HDLApp extends Application {
    //声明一个当前应用的实例
    private static HDLApp mHDLApp;
    //声明一个公共的信息映射,可当作全局变量使用;
    public HashMap<String, String> mInfoMap = new HashMap<>();
    //利用单例模式获取当前应用的唯一实例
    public static HDLApp getInstance() {
        return mHDLApp;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        mHDLApp = this;
    }
    public void setInfoMap(String key, String value) {
        mInfoMap.put(key, value);
    }
    public String getValue(String key) {
        if (mInfoMap.containsKey(key)) {
            return mInfoMap.get(key);
        }
        return "";
    }
    public String getKey(String value) {
        if (mInfoMap.containsValue(value)) {
            for (String key : mInfoMap.keySet()) {
                if (Objects.equals(mInfoMap.get(key), value)) {
                    return key;
                }
            }
        }
        return "";
    }
}
app/src/main/java/com/example/photovoltaic/base/BaseActivity.java
New file
@@ -0,0 +1,99 @@
package com.example.photovoltaic.base;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.example.photovoltaic.listener.BaseView;
import com.example.photovoltaic.utils.AppManagerUtils;
import org.greenrobot.eventbus.EventBus;
public abstract class BaseActivity extends AppCompatActivity implements BaseView {
    protected Activity _mActivity;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        _mActivity = this;
        Object content = getContentView();
        //添加Activity到堆栈
        AppManagerUtils.getAppManager().addActivity(this);
        if (content instanceof Integer) {
            setContentView((int) content);
        } else if (content instanceof View) {
            setContentView((View) content);
        } else {
            throw new RuntimeException("getContentView() should be a @LayoutRes or a View");
        }
        onBindView(savedInstanceState);
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
    /**
     * 显示View
     *
     * @param view
     */
    public void setViewVisible(View view) {
        if (view.getVisibility() != View.VISIBLE) {
            view.setVisibility(View.VISIBLE);
        }
    }
    /**
     * 隐藏View
     *
     * @param view
     */
    protected void setViewGone(View view) {
        if (view.getVisibility() != View.GONE) {
            view.setVisibility(View.GONE);
        }
    }
    /**
     * 简单的跳转Activity
     *
     * @param clazz
     */
    protected void startActivity(Class<?> clazz) {
        Intent intent = new Intent(this, clazz);
        startActivity(intent);
    }
    /**
     * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
     */
    public int dip2px(float dpValue) {
        final float scale = getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
    /**
     * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
     */
    public int px2dip(float pxValue) {
        final float scale = getResources().getDisplayMetrics().density;
        return (int) (pxValue / scale + 0.5f);
    }
}
app/src/main/java/com/example/photovoltaic/base/BaseFragment.java
New file
@@ -0,0 +1,278 @@
package com.example.photovoltaic.base;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle;
import com.example.photovoltaic.listener.BaseView;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale;
public abstract class BaseFragment extends Fragment implements BaseView {
    private boolean isFirst = true;
    protected FragmentActivity _mActivity;
    protected View mContainerView;
//    private LoadingDialog loadingDialog;
//    private LoadingDialog loadingGetDataDialog;
//    private DeviceLoadingDialog deviceLoadingDialog;
    @Override
    public void onAttach(@NonNull Context context) {
        super.onAttach(context);
        _mActivity = getActivity();
    }
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view;
        if (getContentView() instanceof Integer) {
            view = inflater.inflate((int) getContentView(), container, false);
        } else if (getContentView() instanceof View) {
            view = (View) getContentView();
            FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
            view.setLayoutParams(layoutParams);
        } else {
            view = null;
        }
        mContainerView = view;
        return view;
    }
    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        view.postDelayed(new Runnable() {
            @Override
            public void run() {
                dispatchVisible();
            }
        }, 200L);
    }
    @Override
    public void onResume() {
        super.onResume();
        dispatchVisible();
    }
    protected void dispatchVisible() {
        if (null != getParentFragment() && !getParentFragment().isResumed() && getParentFragment().isRemoving()) {
            return;
        }
        if (getLifecycle().getCurrentState() == Lifecycle.State.STARTED && isFirst) {
            if (getView() != null) {
                onLazyInitView(getArguments());
                isFirst = false;
            }
        }
    }
    protected void onLazyInitView(Bundle savedInstanceState) {
        onBindView(savedInstanceState);
//        registerEventBus();
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        _mActivity = null;
        isFirst = true;
//        unregisterEventBus();
    }
    protected void unregisterEventBus() {
        if (EventBus.getDefault().isRegistered(this)) {
            EventBus.getDefault().unregister(this);
        }
    }
    protected void registerEventBus() {
        if (!EventBus.getDefault().isRegistered(this)) {
            EventBus.getDefault().register(this);
        }
    }
//    @Subscribe(threadMode = ThreadMode.MAIN)
//    public void onEventMessage(BaseEvent event) {
//
//    }
    /**
     * 显示View
     *
     * @param view
     */
    public void setViewVisible(View view) {
        if (view.getVisibility() != View.VISIBLE && _mActivity != null) {
            view.setVisibility(View.VISIBLE);
        }
    }
    /**
     * 隐藏View
     *
     * @param view
     */
    protected void setViewGone(View view) {
        if (view.getVisibility() != View.GONE && _mActivity != null) {
            view.setVisibility(View.GONE);
        }
    }
    /**
     * 简单的跳转Activity
     *
     * @param clazz
     */
    protected void startActivity(Class<?> clazz) {
        if (_mActivity != null) {
            Intent intent = new Intent(_mActivity, clazz);
            startActivity(intent);
        }
    }
    /* *//**
     * 获取LoadingDialog
     *
     * @return
     *//*
    protected LoadingDialog getLoadingDialog() {
        if (loadingDialog == null && _mActivity != null) {
            loadingDialog = new LoadingDialog(_mActivity, R.style.loading_dialog);
        }
        return loadingDialog;
    }
    public LoadingDialog getLoadingGetDataDialog() {
        if (loadingGetDataDialog == null && _mActivity != null) {
            loadingGetDataDialog = new LoadingDialog(_mActivity, R.style.loading_dialog);
        }
        return loadingGetDataDialog;
    }
    *//**
     * 获取DeviceLoadingDialog
     *
     * @return
     *//*
    protected DeviceLoadingDialog getDeviceLoadingDialog() {
        if (deviceLoadingDialog == null && _mActivity != null) {
            deviceLoadingDialog = new DeviceLoadingDialog(_mActivity, R.style.loading_dialog);
        }
        return deviceLoadingDialog;
    }
    *//**
     * 开始Loading
     *//*
    public void showLoading() {
        getLoadingDialog().start();
    }
    *//**
     * 开始Loading
     *//*
    public void showDeviceLoading() {
        getDeviceLoadingDialog().start();
    }
    *//**
     * 开始Loading
     *//*
    protected void showLoading(String mes) {
        getLoadingDialog().start();
        getLoadingDialog().setText(mes);
    }
    *//**
     * 开始Loading
     *//*
    protected void showGetDataLoading(String mes) {
        getLoadingGetDataDialog().startTouchNotGone();
        getLoadingGetDataDialog().setText(mes);
    }
    *//**
     * 开始Loading
     *//*
    protected void showDeviceLoading(String mes) {
        getDeviceLoadingDialog().start();
        getDeviceLoadingDialog().setText(mes);
    }
    *//**
     * 停止隐藏Loading
     *//*
    protected void hideLoading() {
        if (loadingDialog != null && loadingDialog.isShowing()) {
            loadingDialog.stop();
        }
    }
    *//**
     * 停止隐藏Loading
     *//*
    protected void hideGetDataLoading() {
        if (loadingGetDataDialog != null && loadingGetDataDialog.isShowing()) {
            loadingGetDataDialog.stop();
        }
    }
    */
    /**
     * 停止隐藏Loading
     *//*
    protected void hideDeviceLoading() {
        if (deviceLoadingDialog != null && deviceLoadingDialog.isShowing()) {
            deviceLoadingDialog.stop();
        }
    }*/
    //用于popwindow显示隐藏时候背景的颜色更换
    protected void backgroundAlpha(float bgAlpha) {
        if (_mActivity != null) {
            WindowManager.LayoutParams lp = _mActivity.getWindow().getAttributes();
            _mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
            lp.alpha = bgAlpha; //0.0-1.0
            _mActivity.getWindow().setAttributes(lp);
        }
    }
    public static boolean isZh(Context context) {
        Locale locale = context.getResources().getConfiguration().locale;
        String language = locale.getLanguage();
        if (language.endsWith("zh"))
            return true;
        else
            return false;
    }
}
app/src/main/java/com/example/photovoltaic/base/CustomBaseActivity.java
New file
@@ -0,0 +1,9 @@
package com.example.photovoltaic.base;
/**
 * 实现个性自定义方法
 */
public abstract class CustomBaseActivity extends BaseActivity {
}
app/src/main/java/com/example/photovoltaic/base/CustomBaseFragment.java
New file
@@ -0,0 +1,7 @@
package com.example.photovoltaic.base;
/**
 * 实现个性自定义方法
 */
public abstract class CustomBaseFragment extends BaseFragment {
}
app/src/main/java/com/example/photovoltaic/enums/ShowErrorMode.java
New file
@@ -0,0 +1,9 @@
package com.example.photovoltaic.enums;
/**
 * 显示错误模式
 */
public enum ShowErrorMode {
    NO,//不显示错误
    YES,//显示错误
}
app/src/main/java/com/example/photovoltaic/listener/BaseView.java
New file
@@ -0,0 +1,10 @@
package com.example.photovoltaic.listener;
import android.os.Bundle;
public interface BaseView {
    Object getContentView();
    void onBindView(Bundle savedInstanceState);
}
app/src/main/java/com/example/photovoltaic/other/HdlLogLogic.java
New file
@@ -0,0 +1,31 @@
package com.example.photovoltaic.other;
import android.nfc.Tag;
import android.util.Log;
/**
 * 日志逻辑
 */
public class HdlLogLogic {
    private static volatile HdlLogLogic sHdlLogLogic;
    public static synchronized HdlLogLogic getInstance() {
        if (sHdlLogLogic == null) {
            synchronized (HdlLogLogic.class) {
                if (sHdlLogLogic == null) {
                    sHdlLogLogic = new HdlLogLogic();
                }
            }
        }
        return sHdlLogLogic;
    }
    public static void print(String tag, String mgs) {
        Log.d(tag, mgs);
    }
}
app/src/main/java/com/example/photovoltaic/other/HdlThreadLogic.java
New file
@@ -0,0 +1,120 @@
package com.example.photovoltaic.other;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;
import com.example.photovoltaic.HDLApp;
import com.example.photovoltaic.enums.ShowErrorMode;
/**
 * 线程逻辑
 */
public class HdlThreadLogic {
    private static final Handler handler = new Handler(Looper.getMainLooper());
    /**
     * 切换回主线程
     *
     * @param run 回调
     */
    public static void runMainThread(Runnable run) {
        try {
            if (Looper.myLooper() == Looper.getMainLooper()) {
                run.run();
            } else {
                handler.post(run);
            }
        } catch (Exception e) {
            exception(e, ShowErrorMode.YES);
        }
    }
    /**
     * 切换回主线程
     *
     * @param run           回调
     * @param context       上下文
     * @param showErrorMode 是否显示错误
     */
    public static void runMainThread(Runnable run, Context context, ShowErrorMode showErrorMode) {
        try {
            if (Looper.myLooper() == Looper.getMainLooper()) {
                run.run();
            } else {
                handler.post(run);
            }
        } catch (Exception e) {
            exception(e, showErrorMode);
        }
    }
    /**
     * 子线程
     *
     * @param run 回调
     */
    public static void runThread(Runnable run) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    run.run();
                } catch (Exception e) {
                    exception(e, ShowErrorMode.NO);
                }
            }
        }).start();
    }
    /**
     * 子线程
     *
     * @param run           回调
     * @param context       上下文
     * @param showErrorMode 是否显示错误
     */
    public static void runThread(Runnable run, Context context, ShowErrorMode showErrorMode) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    run.run();
                } catch (Exception e) {
                    exception(e, showErrorMode);
                }
            }
        }).start();
    }
    private static void exception(Exception e, ShowErrorMode showErrorMode) {
        if (showErrorMode == ShowErrorMode.NO) {
            return;
        }
        handler.post(new Runnable() {
            @Override
            public void run() {
//                Dialog alertDialog = new AlertDialog.Builder(HDLApp.getInstance().getApplicationContext()).
//                        setTitle("抱歉程序出现错误了,点击\"确认\"获取更多详细信息.").
//                        setMessage(e.getMessage()).
//                        create();
//                alertDialog.show();
                //提示
//                AlertDialog alertDialog=new AlertDialog(HDLApp.getInstance().getApplicationContext(), androidx.fragment.R.style.TextAppearance_Compat_Notification);
//                alertDialog.setTitle("抱歉程序出现错误了");
//                alertDialog.show();
                //Toast.makeText(HDLApp.getInstance().getApplicationContext(), "抱歉程序出现错误了", Toast.LENGTH_SHORT).show();
            }
        });
    }
}
app/src/main/java/com/example/photovoltaic/ui/Login/HomeLoginActivity.java
New file
@@ -0,0 +1,230 @@
package com.example.photovoltaic.ui.Login;
import android.os.Bundle;
import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.content.res.AppCompatResources;
import com.example.photovoltaic.R;
import com.example.photovoltaic.base.CustomBaseActivity;
import com.example.photovoltaic.databinding.ActivityHomeLoginBinding;
import com.example.photovoltaic.other.HdlThreadLogic;
import com.example.photovoltaic.ui.home.MyPowerStationActivity;
public class HomeLoginActivity extends CustomBaseActivity {
    private ActivityHomeLoginBinding viewBinding;
    @Override
    public Object getContentView() {
        viewBinding = ActivityHomeLoginBinding.inflate(getLayoutInflater());
        return viewBinding.getRoot();
    }
    @Override
    public void onBindView(Bundle savedInstanceState) {
        //初始化
        initView();
        //初始化界面监听器
        initEvent();
    }
    private void initView() {
        setStringDifferentColors(viewBinding.homeLoginPrivacyTv);
    }
    private void initEvent() {
        viewBinding.homeLoginAccountEt.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            }
            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                Log.d("HomeLoginActivity2", String.format("CharSequence=%s,start=%s,before=%s,count=%s", s, start, before, count));
            }
            @Override
            public void afterTextChanged(Editable s) {
                if (s.length() > 0) {
                    if (viewBinding.homeLoginClearContentsIv.getVisibility() == View.GONE) {
                        viewBinding.homeLoginClearContentsIv.setVisibility(View.VISIBLE);
                    }
                } else {
                    if (viewBinding.homeLoginClearContentsIv.getVisibility() == View.VISIBLE) {
                        viewBinding.homeLoginClearContentsIv.setVisibility(View.GONE);
                    }
                }
                isLoginTextViewEnabled();
            }
        });
        viewBinding.homeLoginClearContentsIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                viewBinding.homeLoginAccountEt.setText("");
            }
        });
        viewBinding.homeLoginPasswordEt.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            }
            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
            }
            @Override
            public void afterTextChanged(Editable s) {
                isLoginTextViewEnabled();
            }
        });
        viewBinding.homeLoginHideIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (v.isSelected()) {
                    v.setSelected(false);
                    viewBinding.homeLoginHideIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.hide));
                    viewBinding.homeLoginPasswordEt.setTransformationMethod(PasswordTransformationMethod.getInstance());
                } else {
                    v.setSelected(true);
                    viewBinding.homeLoginHideIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.show));
                    viewBinding.homeLoginPasswordEt.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
                }
                if (!TextUtils.isEmpty(viewBinding.homeLoginPasswordEt.getText())) {
                    viewBinding.homeLoginPasswordEt.setSelection(viewBinding.homeLoginPasswordEt.getText().length());
                }
            }
        });
        viewBinding.homeLoginCheckIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                v.setSelected(!v.isSelected());
            }
        });
        viewBinding.homeLoginPrivacyCheckIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                v.setSelected(!v.isSelected());
            }
        });
        //登录
        viewBinding.homeLoginTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                boolean isLogin = isLocalCheckAccountAndPassword();
                if (!isLogin) {
                    return;
                }
//                boolean isSelected = viewBinding.homeLoginPrivacyCheckIv.isSelected();
//                if(!isSelected){
//                    //隐私协议提示
//                    return;
//                }
                restoreButtonStyleToInitializeState();
                startActivity(MyPowerStationActivity.class);
            }
        });
        //体验电站
        viewBinding.homeLoginExperienceTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(MyPowerStationActivity.class);
            }
        });
    }
    /**
     * 校验登录按钮是否启用
     */
    private void isLoginTextViewEnabled() {
        String account = viewBinding.homeLoginAccountEt.getText().toString().replace(" ", "");
        String password = viewBinding.homeLoginPasswordEt.getText().toString().replace(" ", "");
        boolean isEnabled = account.length() > 0 && password.length() > 0;
        viewBinding.homeLoginTv.setEnabled(isEnabled);
    }
    /**
     * 本地校验输入账号或者密码是否正确
     * 正确返回<true>true</true>
     * 一般方法
     */
    private boolean isLocalCheckAccountAndPassword() {
        String account = viewBinding.homeLoginAccountEt.getText().toString().replace(" ", "");
        String password = viewBinding.homeLoginPasswordEt.getText().toString().replace(" ", "");
        if (TextUtils.isEmpty(account)) {
            viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_D34545));
            viewBinding.homeLoginAccountTextErrorTv.setText(R.string.home_login_error_账号不能为空);
            return false;
        }
        if (TextUtils.isEmpty(password)) {
            viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545));
            viewBinding.homeLoginPasswordTextErrorTv.setText(R.string.home_login_error_密码不能为空);
            return false;
        }
        if (password.length() < 6 || password.length() > 16) {
            viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545));
            viewBinding.homeLoginPasswordTextErrorTv.setText(R.string.home_login_error_最少6_16个字符);
            return false;
        }
        return true;
    }
    /**
     * 恢复组件样式到初始化状态
     */
    private void restoreButtonStyleToInitializeState() {
        viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_E1E1E1));
        viewBinding.homeLoginAccountTextErrorTv.setText("");
        viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_E1E1E1));
        viewBinding.homeLoginPasswordTextErrorTv.setText("");
    }
    /**
     * 设置一串字符多种颜色
     *
     * @param view 当前组件
     */
    private void setStringDifferentColors(TextView view) {
        String s = view.getText().toString();
        SpannableStringBuilder spannable = new SpannableStringBuilder(s);
        //设置文字的前景色
        spannable.setSpan(new ForegroundColorSpan(getColor(R.color.text_245EC3)), 2, 7, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
        spannable.setSpan(new ForegroundColorSpan(getColor(R.color.text_245EC3)), 9, 19, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
        view.setText(spannable);
    }
}
app/src/main/java/com/example/photovoltaic/ui/StartActivity.java
New file
@@ -0,0 +1,24 @@
package com.example.photovoltaic.ui;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import com.example.photovoltaic.R;
import com.example.photovoltaic.ui.Login.HomeLoginActivity;
public class StartActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);
        Intent intent = new Intent();
        intent.setClass(this, HomeLoginActivity.class);
        startActivity(intent);
        finish();
    }
}
app/src/main/java/com/example/photovoltaic/ui/adapter/HouseInfoAdapter.java
New file
@@ -0,0 +1,67 @@
package com.example.photovoltaic.ui.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.photovoltaic.R;
import com.example.photovoltaic.ui.bean.HouseInfoBean;
import java.util.List;
public class HouseInfoAdapter extends RecyclerView.Adapter<HouseInfoAdapter.MyViewHolder> {
    private List<HouseInfoBean> mList;
    public HouseInfoAdapter(List<HouseInfoBean> list) {
        this.mList = list;
    }
    @NonNull
    @Override
    public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View contentItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.frgment_house_list_line, parent, false);
        return new MyViewHolder(contentItem);
    }
    @Override
    public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
        HouseInfoBean houseInfoBean = this.mList.get(position);
        holder.homeNameTv.setText(houseInfoBean.getName());
    }
    @Override
    public int getItemCount() {
        return this.mList == null ? 0 : this.mList.size();
    }
    public void setList(List<HouseInfoBean> list) {
        this.mList = list;
    }
    static class MyViewHolder extends RecyclerView.ViewHolder {
        public ImageView homeIconIv;//住宅图片
        public TextView homeNameTv;//住宅名称
        public TextView capacityTv;//装机容量
        public TextView powerTv;//发电功率
        public TextView stateTv;//电站状态(连接中,运行,离线,故障);
        public MyViewHolder(@NonNull View itemView) {
            super(itemView);
            homeIconIv = itemView.findViewById(R.id.fragment_house_list_line_left_iv);
            homeNameTv = itemView.findViewById(R.id.fragment_house_list_line_name_tv);
            capacityTv = itemView.findViewById(R.id.fragment_house_list_line_capacity_tv);
            powerTv = itemView.findViewById(R.id.fragment_house_list_line_power_tv);
            stateTv = itemView.findViewById(R.id.fragment_house_list_line_state_tv);
        }
    }
}
app/src/main/java/com/example/photovoltaic/ui/bean/HouseInfoBean.java
New file
@@ -0,0 +1,17 @@
package com.example.photovoltaic.ui.bean;
import java.io.Serializable;
public class HouseInfoBean implements Serializable {
    private String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}
app/src/main/java/com/example/photovoltaic/ui/home/HouseListFragment.java
New file
@@ -0,0 +1,113 @@
package com.example.photovoltaic.ui.home;
import android.content.Context;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.example.photovoltaic.R;
import com.example.photovoltaic.base.CustomBaseFragment;
import com.example.photovoltaic.databinding.FragmentHouseListBinding;
import com.example.photovoltaic.ui.adapter.HouseInfoAdapter;
import com.example.photovoltaic.ui.bean.HouseInfoBean;
import com.example.photovoltaic.utils.FlashLightUtils;
import java.util.ArrayList;
import java.util.List;
public class HouseListFragment extends CustomBaseFragment {
    private FragmentHouseListBinding viewBinding;
    private HouseInfoAdapter houseInfoAdapter;
    private FlashLightUtils flashLightUtils;
    private     CameraManager  manager;
    private List<HouseInfoBean> houseInfoBeanList = null;
    @Override
    public Object getContentView() {
        viewBinding = FragmentHouseListBinding.inflate(getLayoutInflater());
        return viewBinding.getRoot();
    }
    @Override
    public void onBindView(Bundle savedInstanceState) {
         flashLightUtils = new FlashLightUtils(_mActivity);
          manager = (CameraManager) _mActivity.getSystemService(Context.CAMERA_SERVICE);
        initData();
        //初始化
        initView();
        //初始化界面监听器
        initEvent();
    }
    private void initEvent() {
        viewBinding.toolbarTopFragmentHouseListRl.topMoreIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                try {
//                    manager.setTorchMode("0",true);
//                } catch (CameraAccessException e) {
//                    e.printStackTrace();
//                }
//                flashLightUtils.open();
            }
        });
        //设置下拉箭头颜色
        viewBinding.fragmentHouseSrl.setColorSchemeResources(R.color.text_FF245EC3);
        viewBinding.fragmentHouseSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
//                flashLightUtils.cloes();
//                try {
//                    manager.setTorchMode("0",false);
//                } catch (CameraAccessException e) {
//                    e.printStackTrace();
//                }
//                viewBinding.fragmentHouseSrl.setRefreshing(false);
                Log.d("HouseListFragment", "下拉刷新");
            }
        });
    }
    private void initView() {
        viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.my_power_station_我的电站);
        viewBinding.toolbarTopFragmentHouseListRl.topMoreIv.setVisibility(View.VISIBLE);
        viewBinding.toolbarTopFragmentHouseListRl.topMoreIv.setImageResource(R.drawable.add);
        LinearLayoutManager linearLayout = new LinearLayoutManager(_mActivity);
        houseInfoAdapter = new HouseInfoAdapter(this.houseInfoBeanList);
        viewBinding.fragmentHouseSrlListRc.setLayoutManager(linearLayout);
        viewBinding.fragmentHouseSrlListRc.setAdapter(houseInfoAdapter);
    }
    private void initData() {
        this.houseInfoBeanList = new ArrayList<>();
        for (int i = 0; i < 11; i++) {
            HouseInfoBean houseInfoBean = new HouseInfoBean();
            houseInfoBean.setName("电站" + i);
            this.houseInfoBeanList.add(houseInfoBean);
        }
    }
    private void openCamera() {
    }
}
app/src/main/java/com/example/photovoltaic/ui/home/MeFragment.java
New file
@@ -0,0 +1,32 @@
package com.example.photovoltaic.ui.home;
import android.os.Bundle;
import android.view.View;
import com.example.photovoltaic.R;
import com.example.photovoltaic.base.CustomBaseFragment;
import com.example.photovoltaic.databinding.FragmentMeBinding;
public class MeFragment extends CustomBaseFragment {
    private FragmentMeBinding viewBinding;
    @Override
    public Object getContentView() {
        viewBinding = FragmentMeBinding.inflate(getLayoutInflater());
        return viewBinding.getRoot();
    }
    @Override
    public void onBindView(Bundle savedInstanceState) {
        viewBinding.toolbarTopFragmentMeRl.topTitleTv.setText(R.string.my_power_station_我的);
        viewBinding.toolbarTopFragmentMeRl.topMoreIv.setVisibility(View.VISIBLE);
        viewBinding.toolbarTopFragmentMeRl.topMoreIv.setImageResource(R.drawable.message);
        viewBinding.fragmentMeLineSetIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.set);
        viewBinding.fragmentMeLineSetIl.fragmentMeLineTitleIv.setText(R.string.me_设置);
        viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.asregards);
        viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineTitleIv.setText(R.string.me_关于);
    }
}
app/src/main/java/com/example/photovoltaic/ui/home/MyPowerStationActivity.java
New file
@@ -0,0 +1,80 @@
package com.example.photovoltaic.ui.home;
import androidx.appcompat.content.res.AppCompatResources;
import android.os.Bundle;
import android.view.View;
import com.example.photovoltaic.R;
import com.example.photovoltaic.base.CustomBaseActivity;
import com.example.photovoltaic.databinding.ActivityMyPowerStationBinding;
public class MyPowerStationActivity extends CustomBaseActivity {
    private ActivityMyPowerStationBinding viewBinding;
    private int currentFragmentIndex = 0;
    @Override
    public Object getContentView() {
        viewBinding = ActivityMyPowerStationBinding.inflate(getLayoutInflater());
        return viewBinding.getRoot();
    }
    @Override
    public void onBindView(Bundle savedInstanceState) {
        //初始化
        initView();
        //初始化界面监听器
        initEvent();
    }
    private void initEvent() {
        viewBinding.myPowerStationBottomIl1.clickTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                currentFragmentIndex = 0;
                bottomViewChangeOfStyle();
            }
        });
        viewBinding.myPowerStationBottomIl2.clickTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                currentFragmentIndex = 1;
                bottomViewChangeOfStyle();
            }
        });
    }
    private void initView() {
        viewBinding.myPowerStationBottomIl1.titleTv.setText(R.string.my_power_station_电站);
        viewBinding.myPowerStationBottomIl2.titleTv.setText(R.string.my_power_station_我的);
        this.bottomViewChangeOfStyle();
    }
    private void bottomViewChangeOfStyle() {
        if (this.currentFragmentIndex == 0) {
            viewBinding.myPowerStationFcv1.setVisibility(View.VISIBLE);
            viewBinding.myPowerStationFcv2.setVisibility(View.GONE);
            viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.selectedpowerstation));
            viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_90000000));
            viewBinding.myPowerStationBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.unselectedme));
            viewBinding.myPowerStationBottomIl2.titleTv.setTextColor(getColor(R.color.text_65000000));
        } else {
            viewBinding.myPowerStationFcv1.setVisibility(View.GONE);
            viewBinding.myPowerStationFcv2.setVisibility(View.VISIBLE);
            viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.unselectedpowerstation));
            viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_65000000));
            viewBinding.myPowerStationBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.selectedme));
            viewBinding.myPowerStationBottomIl2.titleTv.setTextColor(getColor(R.color.text_90000000));
        }
    }
}
app/src/main/java/com/example/photovoltaic/utils/AppManagerUtils.java
New file
@@ -0,0 +1,162 @@
package com.example.photovoltaic.utils;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import java.util.Iterator;
import java.util.Stack;
/**
 * Author: Zoro
 * Date: 2019/6/9
 * Description: This is AppManagerUtils
 */
public class AppManagerUtils {
    private static AppManagerUtils appManagerUtils;
    private AppManagerUtils() {
    }
    public static AppManagerUtils getAppManager() {
        if (null == appManagerUtils) {
            synchronized (AppManagerUtils.class) {
                if (null == appManagerUtils) {
                    appManagerUtils = new AppManagerUtils();
                }
            }
        }
        return appManagerUtils;
    }
    /**
     * 获取AppVersion
     *
     * @param context
     * @return
     */
    public static String getAppVersion(Context context) {
        String version = "";
        try {
            String packageName = context.getPackageName();
            PackageManager packageManager = context.getPackageManager();
            PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);
            version = packageInfo.versionName;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
        return version;
    }
    /**
     * 默认的Activity堆栈
     */
    private Stack<Activity> activityStack;
    /**
     * 添加Activity到堆栈
     */
    public void addActivity(Activity activity) {
        if (activityStack == null) {
            activityStack = new Stack<>();
        }
        activityStack.add(activity);
    }
    /**
     * 移除Activity
     */
    public void removeActivity(Activity activity) {
        if (activity != null) {
            activityStack.remove(activity);
        }
    }
    /**
     * 结束指定类名的Activity
     */
    public void finishActivity(Class<?>... args) {
        Iterator<Activity> iterator = activityStack.listIterator();
        while (iterator.hasNext()) {
            Activity activity = iterator.next();
            for (Class<?> cls : args) {
                if (activity.getClass().equals(cls)) {
                    activity.finish();
                    iterator.remove();
                }
            }
        }
    }
    /**
     * 指定一个类名,从指定类名开始移除后面所有Activity
     * @param className Activity-类名(activity.getClass().getName())
     * @param removeClass 是否移除本身(true-移除)
     */
    public void finishActivity(String className,boolean removeClass) {
        Iterator<Activity> iterator = activityStack.listIterator();
        while (iterator.hasNext()) {
            Activity activity = iterator.next();
            if (activity.getClass().getName().equals(className)) {
                if (removeClass) {
                    activity.finish();
                    iterator.remove();
                }
                break;
            } else {
                activity.finish();
                iterator.remove();
            }
        }
//        int count= activityStack.size() - 1;
//        for (Iterator<Activity> it = activityStack.listIterator(count); it.hasNext(); ) {
//            Activity activity = it.next();
//            System.out.println("移除结束" + activity.getClass().getName());
//            if (activity.getClass().getName().equals(className)) {
//                if (removeClass) {
//                    activity.finish();
//                    it.remove();
//                }
//                break;
//            } else {
//                activity.finish();
//                it.remove();
//            }
//        }
    }
    /**
     * 结束所有Activity
     */
    public void finishAllActivity() {
        for (int i = 0, size = activityStack.size(); i < size; i++) {
            if (null != activityStack.get(i)) {
                Activity activity = activityStack.get(i);
                if (!activity.isFinishing()) {
                    activity.finish();
                }
            }
        }
        activityStack.clear();
    }
//    /**
//     * 判断当前应用是否是debug状态
//     */
//    public static boolean isApkInDebug(Context context) {
//        try {
//            ApplicationInfo info = context.getApplicationInfo();
//            return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
//        } catch (Exception e) {
//            return false;
//        }
//    }
}
app/src/main/java/com/example/photovoltaic/utils/FlashLightUtils.java
New file
@@ -0,0 +1,83 @@
package com.example.photovoltaic.utils;
import android.content.Context;
import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraManager;
import android.os.Build;
import android.hardware.Camera;
import android.text.method.Touch;
import java.util.Optional;
public class FlashLightUtils {
    private CameraManager manager;
    private Camera mCamera = null;
    private Context context;
    private boolean status = false;     // 记录手机状态
    public FlashLightUtils(Context context) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            manager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE);
        }
        this.context = context;
    }
    // 打开手电筒
    public void open() {
        if (status) {   //如果是打开状态,不需要打开
            return;
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            try {
                manager.setTorchMode("0", true);
            } catch (CameraAccessException e) {
                e.printStackTrace();
            }
        } else {
            PackageManager packageManager = context.getPackageManager();
            FeatureInfo[] features = packageManager.getSystemAvailableFeatures();
            for (FeatureInfo featureInfo : features) {
                // 判断设备是否支持闪光灯
                if (packageManager.FEATURE_CAMERA_FLASH.equals(featureInfo.name)) {
                    if (null == mCamera) {
                        mCamera = Camera.open();
                    }
                    Camera.Parameters parameters = mCamera.getParameters();
                    parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
                    mCamera.setParameters(parameters);
                    mCamera.startPreview();
                }
            }
        }
        status = true;      // 记录手电筒状态为打开
    }
    // 关闭手电筒
    public void cloes() {
        if (!status)    // 如果是已经关闭的状态 不需要打开
        {
            return;
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            try {
                manager.setTorchMode("0", false);
            } catch (CameraAccessException e) {
                e.printStackTrace();
            }
        } else {
            if (mCamera != null) {
                mCamera.stopPreview();
                mCamera.release();
                mCamera = null;
            }
        }
        status = false; // 记录手电筒为关闭
    }
}
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
New file
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
        <aapt:attr name="android:fillColor">
            <gradient
                android:endX="85.84757"
                android:endY="92.4963"
                android:startX="42.9492"
                android:startY="49.59793"
                android:type="linear">
                <item
                    android:color="#44000000"
                    android:offset="0.0" />
                <item
                    android:color="#00000000"
                    android:offset="1.0" />
            </gradient>
        </aapt:attr>
    </path>
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
        android:strokeWidth="1"
        android:strokeColor="#00000000" />
</vector>
app/src/main/res/drawable/add.png
app/src/main/res/drawable/asregards.png
app/src/main/res/drawable/checked.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_245EC3"/>
    <corners android:radius="@dimen/dp_4"/>
</shape>
app/src/main/res/drawable/clear.png
app/src/main/res/drawable/down.png
app/src/main/res/drawable/hide.png
app/src/main/res/drawable/house_list_line_parent_bg.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/text_FFFFFFFF" />
    <corners android:radius="@dimen/dp_4" />
</shape>
app/src/main/res/drawable/ic_launcher_background.xml
New file
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillColor="#3DDC84"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,0L39,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M99,0L99,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,59L108,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,39L89,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,19L39,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
</vector>
app/src/main/res/drawable/message.png
app/src/main/res/drawable/more.png
app/src/main/res/drawable/next.png
app/src/main/res/drawable/region.png
app/src/main/res/drawable/selected.png
app/src/main/res/drawable/selectedme.png
app/src/main/res/drawable/selectedpowerstation.png
app/src/main/res/drawable/set.png
app/src/main/res/drawable/show.png
app/src/main/res/drawable/state_06b92a.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/text_06B92A" />
    <corners
        android:bottomLeftRadius="@dimen/dp_4"
        android:topRightRadius="@dimen/dp_4" />
</shape>
app/src/main/res/drawable/state_b9b9b9.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/text_B9B9B9" />
    <corners
        android:bottomLeftRadius="@dimen/dp_4"
        android:topRightRadius="@dimen/dp_4" />
</shape>
app/src/main/res/drawable/state_e34343.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/text_E34343" />
    <corners
        android:bottomLeftRadius="@dimen/dp_4"
        android:topRightRadius="@dimen/dp_4" />
</shape>
app/src/main/res/drawable/state_ffb300.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/text_FFB300" />
    <corners
        android:bottomLeftRadius="@dimen/dp_4"
        android:topRightRadius="@dimen/dp_4" />
</shape>
app/src/main/res/drawable/unchecked_btn.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_94B6E7"/>
    <corners android:radius="@dimen/dp_4"/>
</shape>
app/src/main/res/drawable/unselected.png
app/src/main/res/drawable/unselectedme.png
app/src/main/res/drawable/unselectedpowerstation.png
app/src/main/res/drawable/yesandnocheck.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/checked" android:state_enabled="true" />
    <item android:drawable="@drawable/unchecked_btn" android:state_enabled="false" />
</selector>
app/src/main/res/drawable/yesandnoselected.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/selected" android:state_selected="true" />
    <item android:drawable="@drawable/unselected" android:state_selected="false" />
</selector>
app/src/main/res/layout/activity_home_login.xml
New file
@@ -0,0 +1,260 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
    tools:context=".ui.Login.HomeLoginActivity">
    <ImageView
        android:id="@+id/home_login_server_iv"
        android:layout_width="@dimen/dp_13"
        android:layout_height="@dimen/dp_13"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginTop="@dimen/dp_63"
        android:src="@drawable/region"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <TextView
        android:id="@+id/home_login_language_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_6"
        android:text="@string/home_login_中文"
        android:textColor="@color/text_FF000000"
        android:textSize="@dimen/text_14"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_server_iv"
        app:layout_constraintStart_toEndOf="@+id/home_login_server_iv"
        app:layout_constraintTop_toTopOf="@+id/home_login_server_iv" />
    <ImageView
        android:id="@+id/home_login_down_iv"
        android:layout_width="@dimen/dp_11"
        android:layout_height="@dimen/dp_7"
        android:layout_marginStart="@dimen/dp_1"
        android:src="@drawable/down"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_language_tv"
        app:layout_constraintStart_toEndOf="@+id/home_login_language_tv"
        app:layout_constraintTop_toTopOf="@+id/home_login_language_tv" />
    <ImageView
        android:id="@+id/home_login_more_iv"
        android:layout_width="@dimen/dp_20"
        android:layout_height="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_20"
        android:src="@drawable/more"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_language_tv"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/home_login_language_tv" />
    <TextView
        android:id="@+id/home_login_title_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_39"
        android:layout_marginTop="@dimen/dp_40"
        android:text="@string/home_login_HDL光伏储能"
        android:textColor="@color/text_90000000"
        android:textSize="@dimen/text_28"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="@+id/home_login_server_iv"
        app:layout_constraintTop_toBottomOf="@+id/home_login_language_tv" />
    <ImageView
        android:id="@+id/home_login_check_iv"
        android:layout_width="@dimen/dp_20"
        android:layout_height="@dimen/dp_20"
        android:layout_marginTop="@dimen/dp_56"
        android:background="@drawable/yesandnoselected"
        app:layout_constraintStart_toStartOf="@+id/home_login_server_iv"
        app:layout_constraintTop_toBottomOf="@+id/home_login_title_tv" />
    <TextView
        android:id="@+id/home_login_install_user_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_16"
        android:text="@string/home_login_我是安装商"
        android:textColor="@color/text_FF000000"
        android:textSize="@dimen/text_14"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_check_iv"
        app:layout_constraintStart_toEndOf="@+id/home_login_check_iv"
        app:layout_constraintTop_toTopOf="@+id/home_login_check_iv" />
    <!--账号输入框-->
    <EditText
        android:id="@+id/home_login_account_et"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginTop="@dimen/dp_44"
        android:layout_marginEnd="@dimen/dp_60"
        android:background="@null"
        android:gravity="center_vertical"
        android:hint="@string/home_login_请输入手机号_邮箱号"
        android:inputType="text"
        android:lines="1"
        android:maxLines="1"
        android:textColor="@color/text_FF000000"
        android:textColorHint="@color/text_25000000"
        android:textSize="@dimen/text_16"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/home_login_install_user_tv" />
    <ImageView
        android:id="@+id/home_login_clear_contents_iv"
        android:layout_width="@dimen/dp_20"
        android:layout_height="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_32"
        android:src="@drawable/clear"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_account_et"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/home_login_account_et" />
    <View
        android:id="@+id/home_login_line1_v"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_20"
        android:background="@color/text_E1E1E1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/home_login_account_et" />
    <TextView
        android:id="@+id/home_login_account_text_error_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:textColor="@color/text_D34545"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="@+id/home_login_line1_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_line1_v" />
    <!--密码输入框-->
    <EditText
        android:id="@+id/home_login_password_et"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginTop="32dp"
        android:layout_marginEnd="@dimen/dp_60"
        android:background="@null"
        android:gravity="center_vertical"
        android:hint="@string/home_login_请输入密码"
        android:inputType="textPassword"
        android:lines="1"
        android:maxLines="1"
        android:textColor="@color/text_FF000000"
        android:textColorHint="@color/text_25000000"
        android:textSize="@dimen/text_16"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/home_login_line1_v" />
    <ImageView
        android:id="@+id/home_login_hide_iv"
        android:layout_width="@dimen/dp_20"
        android:layout_height="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_32"
        android:src="@drawable/hide"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_password_et"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/home_login_password_et" />
    <View
        android:id="@+id/home_login_line2_v"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="@color/text_E1E1E1"
        app:layout_constraintEnd_toEndOf="@+id/home_login_line1_v"
        app:layout_constraintStart_toStartOf="@+id/home_login_line1_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_password_et" />
    <TextView
        android:id="@+id/home_login_password_text_error_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:textColor="@color/text_D34545"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="@+id/home_login_line2_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_line2_v" />
    <TextView
        android:id="@+id/home_login_register_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_20"
        android:layout_marginTop="@dimen/dp_24"
        android:text="@string/home_login_注册"
        android:textColor="@color/text_245EC3"
        android:textSize="@dimen/text_14"
        app:layout_constraintStart_toStartOf="@+id/home_login_line2_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_line2_v" />
    <TextView
        android:id="@+id/home_login_forget_password_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_20"
        android:layout_marginTop="@dimen/dp_24"
        android:text="@string/home_login_忘记密码"
        android:textColor="@color/text_245EC3"
        android:textSize="@dimen/text_14"
        app:layout_constraintEnd_toEndOf="@+id/home_login_line2_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_line2_v" />
    <!--登录-->
    <TextView
        android:id="@+id/home_login_tv"
        android:layout_width="0dp"
        android:layout_height="52dp"
        android:layout_marginTop="@dimen/dp_45"
        android:background="@drawable/yesandnocheck"
        android:gravity="center"
        android:text="@string/home_login_登录"
        android:textColor="@color/text_FFFFFFFF"
        android:textSize="18sp"
        android:enabled="false"
        app:layout_constraintEnd_toEndOf="@+id/home_login_line2_v"
        app:layout_constraintStart_toStartOf="@+id/home_login_line2_v"
        app:layout_constraintTop_toBottomOf="@+id/home_login_forget_password_tv" />
    <TextView
        android:id="@+id/home_login_experience_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_25"
        android:layout_marginTop="@dimen/text_28"
        android:text="@string/home_login_体验电站"
        android:textColor="@color/text_245EC3"
        android:textSize="18sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/home_login_tv" />
    <ImageView
        android:id="@+id/home_login_privacy_check_iv"
        android:layout_width="@dimen/dp_20"
        android:layout_height="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_42"
        android:layout_marginTop="@dimen/dp_208"
        android:background="@drawable/yesandnoselected"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/home_login_tv" />
    <TextView
        android:id="@+id/home_login_privacy_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_16"
        android:text="@string/home_login_同意_服务协议"
        android:textColor="@color/text_FF000000"
        android:textSize="@dimen/text_14"
        app:layout_constraintBottom_toBottomOf="@+id/home_login_privacy_check_iv"
        app:layout_constraintStart_toEndOf="@+id/home_login_privacy_check_iv"
        app:layout_constraintTop_toTopOf="@+id/home_login_privacy_check_iv" />
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/activity_my_power_station.xml
New file
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="@color/text_F9FAFB"
    tools:context=".ui.home.MyPowerStationActivity">
    <!--我的电站-Fragment-->
    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/my_power_station_fcv1"
        android:name="com.example.photovoltaic.ui.home.HouseListFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <!--我的-Fragment-->
    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/my_power_station_fcv2"
        android:name="com.example.photovoltaic.ui.home.MeFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <LinearLayout
        android:id="@+id/my_power_station_bottom_ll"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_49"
        android:background="@color/text_FFFFFFFF"
        android:gravity="center"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">
        <!--电站-标签-->
        <include
            android:id="@+id/my_power_station_bottom_il1"
            layout="@layout/home_bottom_line" />
        <View
            android:layout_width="@dimen/dp_1"
            android:layout_height="@dimen/dp_17"
            android:background="@color/text_CBCDD1" />
        <!--我的-标签-->
        <include
            android:id="@+id/my_power_station_bottom_il2"
            layout="@layout/home_bottom_line" />
    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/activity_start.xml
New file
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
    tools:context=".ui.StartActivity">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="欢迎打开智慧能源APP"
        android:textColor="@color/text_245EC3"
        android:textSize="@dimen/text_28"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.496"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.093" />
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/fragment_house_list.xml
New file
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">
    <include
        android:id="@+id/toolbar_top_fragment_house_list_rl"
        layout="@layout/toolbar_top_view_52" />
    <RelativeLayout
        android:id="@+id/fragment_house_list_head_rl"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_64"
        android:background="@color/text_F9FAFB"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar_top_fragment_house_list_rl">
        <LinearLayout
            android:id="@+id/fragment_house_list_content_ll"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/dp_20"
            android:layout_marginEnd="@dimen/dp_20"
            android:orientation="horizontal">
            <RelativeLayout
                android:id="@+id/fragment_house_list_content_title1_rl"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="3"
                android:gravity="center"
                android:orientation="horizontal">
                <TextView
                    android:id="@+id/fragment_house_list_content_title1_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/dp_20"
                    android:text="@string/my_power_station_发电功率"
                    android:textColor="@color/text_90000000"
                    android:textSize="@dimen/text_14" />
                <ImageView
                    android:id="@+id/fragment_house_list_content_title1_iv"
                    android:layout_width="@dimen/dp_10"
                    android:layout_height="@dimen/dp_6"
                    android:layout_alignTop="@+id/fragment_house_list_content_title1_tv"
                    android:layout_alignBottom="@+id/fragment_house_list_content_title1_tv"
                    android:layout_marginStart="@dimen/dp_7"
                    android:layout_toEndOf="@+id/fragment_house_list_content_title1_tv"
                    android:src="@drawable/down" />
            </RelativeLayout>
            <RelativeLayout
                android:id="@+id/fragment_house_list_content_title2_rl"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="3"
                android:gravity="center"
                android:orientation="horizontal">
                <TextView
                    android:id="@+id/fragment_house_list_content_title2_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/dp_20"
                    android:text="@string/my_power_station_今日发电"
                    android:textColor="@color/text_90000000"
                    android:textSize="@dimen/text_14" />
                <ImageView
                    android:id="@+id/my_power_station_content_title2_iv"
                    android:layout_width="@dimen/dp_10"
                    android:layout_height="@dimen/dp_6"
                    android:layout_alignTop="@+id/fragment_house_list_content_title2_tv"
                    android:layout_alignBottom="@+id/fragment_house_list_content_title2_tv"
                    android:layout_marginStart="@dimen/dp_7"
                    android:layout_toEndOf="@+id/fragment_house_list_content_title2_tv"
                    android:src="@drawable/down" />
            </RelativeLayout>
            <RelativeLayout
                android:id="@+id/fragment_house_list_content_title3_rl"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="3"
                android:gravity="center"
                android:orientation="horizontal">
                <TextView
                    android:id="@+id/fragment_house_list_content_title3_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/dp_20"
                    android:text="@string/my_power_station_创建时间"
                    android:textColor="@color/text_90000000"
                    android:textSize="@dimen/text_14" />
                <ImageView
                    android:id="@+id/fragment_house_list_content_title3_iv"
                    android:layout_width="@dimen/dp_10"
                    android:layout_height="@dimen/dp_6"
                    android:layout_alignTop="@+id/fragment_house_list_content_title3_tv"
                    android:layout_alignBottom="@+id/fragment_house_list_content_title3_tv"
                    android:layout_marginStart="@dimen/dp_7"
                    android:layout_toEndOf="@+id/fragment_house_list_content_title3_tv"
                    android:src="@drawable/down" />
            </RelativeLayout>
        </LinearLayout>
    </RelativeLayout>
    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/fragment_house_srl"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fragment_house_list_head_rl">
        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/fragment_house_srl_list_rc"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/fragment_me.xml
New file
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <include
        android:id="@+id/toolbar_top_fragment_me_rl"
        layout="@layout/toolbar_top_view_52" />
    <ImageView
        android:id="@+id/fragment_me_icon_iv"
        android:layout_width="69dp"
        android:layout_height="69dp"
        android:layout_marginTop="@dimen/dp_39"
        android:background="@color/text_D34545"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar_top_fragment_me_rl" />
    <TextView
        android:id="@+id/fragment_me_user_name_iv"
        android:layout_width="wrap_content"
        android:layout_height="25dp"
        android:layout_marginTop="@dimen/dp_16"
        android:text="开始设计了"
        android:textColor="@color/text_90000000"
        android:textSize="@dimen/text_18"
        app:layout_constraintEnd_toEndOf="@+id/fragment_me_icon_iv"
        app:layout_constraintStart_toStartOf="@+id/fragment_me_icon_iv"
        app:layout_constraintTop_toBottomOf="@+id/fragment_me_icon_iv" />
    <include
        android:id="@+id/fragment_me_line_set_il"
        layout="@layout/fragment_me_line"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_64"
        android:layout_marginTop="@dimen/dp_48"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fragment_me_user_name_iv" />
    <include
        android:id="@+id/fragment_me_line_asregards_il"
        layout="@layout/fragment_me_line"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_64"
        android:layout_marginTop="@dimen/dp_12"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fragment_me_line_set_il" />
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/fragment_me_line.xml
New file
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="@dimen/dp_64"
    android:background="@color/text_F9FAFB">
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_20"
        android:background="@color/text_FFFFFFFF"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">
        <ImageView
            android:id="@+id/fragment_me_line_left_icon_iv"
            android:layout_width="@dimen/dp_24"
            android:layout_height="@dimen/dp_24"
            android:layout_marginStart="@dimen/dp_16"
            android:src="@drawable/set"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <TextView
            android:id="@+id/fragment_me_line_title_iv"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/dp_23"
            android:layout_marginStart="@dimen/dp_7"
            android:text="@string/me_设置"
            android:textColor="@color/text_90000000"
            android:textSize="@dimen/dp_16"
            app:layout_constraintBottom_toBottomOf="@id/fragment_me_line_left_icon_iv"
            app:layout_constraintStart_toEndOf="@+id/fragment_me_line_left_icon_iv"
            app:layout_constraintTop_toTopOf="@id/fragment_me_line_left_icon_iv" />
        <ImageView
            android:id="@+id/fragment_me_line_right_icon_iv"
            android:layout_width="@dimen/dp_7"
            android:layout_height="@dimen/dp_12"
            android:layout_marginEnd="@dimen/dp_23"
            android:src="@drawable/next"
            app:layout_constraintBottom_toBottomOf="@id/fragment_me_line_left_icon_iv"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/fragment_me_line_left_icon_iv" />
        <!--隐藏线条-->
<!--        <View-->
        <!--            android:id="@+id/fragment_me_line_v"-->
        <!--            android:layout_width="0dp"-->
        <!--            android:layout_height="1dp"-->
        <!--            android:background="@color/text_E1E1E1"-->
        <!--            app:layout_constraintBottom_toBottomOf="parent"-->
        <!--            app:layout_constraintEnd_toEndOf="parent"-->
        <!--            app:layout_constraintStart_toStartOf="parent" />-->
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/frgment_house_list_line.xml
New file
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="142dp"
    android:background="@color/text_F9FAFB">
    <RelativeLayout
        android:id="@+id/fragment_house_list_line_parent_rl"
        android:layout_width="0dp"
        android:layout_height="130dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginEnd="@dimen/dp_20"
        android:background="@drawable/house_list_line_parent_bg">
        <ImageView
            android:id="@+id/fragment_house_list_line_left_iv"
            android:layout_width="113dp"
            android:layout_height="130dp"
            android:background="@color/text_245EC3" />
        <TextView
            android:id="@+id/fragment_house_list_line_name_tv"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/dp_23"
            android:layout_marginStart="@dimen/dp_15"
            android:layout_marginTop="@dimen/dp_28"
            android:layout_toEndOf="@+id/fragment_house_list_line_left_iv"
            android:gravity="center_vertical"
            android:text="@string/my_power_station_电站"
            android:textColor="@color/text_90000000"
            android:textSize="@dimen/text_16" />
        <TextView
            android:id="@+id/fragment_house_list_line_capacity_tv"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/dp_17"
            android:layout_below="@+id/fragment_house_list_line_name_tv"
            android:layout_alignStart="@+id/fragment_house_list_line_name_tv"
            android:layout_marginTop="@dimen/dp_13"
            android:gravity="center_vertical"
            android:text="@string/my_power_station_装机容量"
            android:textColor="@color/text_40000000"
            android:textSize="@dimen/text_12" />
        <TextView
            android:id="@+id/fragment_house_list_line_power_tv"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/dp_17"
            android:layout_below="@+id/fragment_house_list_line_capacity_tv"
            android:layout_alignStart="@+id/fragment_house_list_line_capacity_tv"
            android:layout_marginTop="@dimen/dp_13"
            android:gravity="center_vertical"
            android:text="@string/my_power_station_发电功率"
            android:textColor="@color/text_40000000"
            android:textSize="@dimen/text_12" />
        <TextView
            android:id="@+id/fragment_house_list_line_state_tv"
            android:layout_width="@dimen/dp_48"
            android:layout_height="@dimen/dp_33"
            android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
            android:background="@drawable/state_ffb300"
            android:gravity="center"
            android:text="@string/my_power_station_连接中"
            android:textColor="@color/text_FFFFFFFF"
            android:textSize="@dimen/text_12" />
    </RelativeLayout>
</RelativeLayout>
app/src/main/res/layout/home_bottom_line.xml
New file
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="187dp"
    android:layout_height="@dimen/dp_49">
    <ImageView
        android:id="@+id/icon_iv"
        android:layout_width="@dimen/dp_22"
        android:layout_height="@dimen/dp_22"
        android:layout_alignParentTop="true"
        android:layout_centerInParent="true"
        android:layout_marginTop="@dimen/dp_8" />
    <TextView
        android:id="@+id/title_tv"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/text_14"
        android:layout_below="@+id/icon_iv"
        android:layout_centerInParent="true"
        android:layout_marginTop="@dimen/dp_2"
        android:textColor="@color/text_90000000"
        android:textSize="@dimen/text_10" />
    <!--加大点击热区-->
    <TextView
        android:id="@+id/click_tv"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="@dimen/dp_30"
        android:layout_marginEnd="@dimen/dp_30" />
</RelativeLayout>
app/src/main/res/layout/toolbar_top_view_44.xml
New file
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/top_bar_view"
    android:layout_width="match_parent"
    android:layout_height="@dimen/dp_44"
    android:orientation="horizontal">
    <!--1.返回按钮 增大点击区域-->
    <LinearLayout
        android:id="@+id/top_back_btn"
        android:layout_width="@dimen/dp_56"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="horizontal">
        <ImageView
            android:layout_width="@dimen/dp_24"
            android:layout_height="@dimen/dp_24"
            android:layout_gravity="center"
            android:layout_marginLeft="@dimen/dp_16"
            android:scaleType="centerInside" />
    </LinearLayout>
    <!--2.标题文本-->
    <TextView
        android:id="@+id/top_title_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_marginLeft="@dimen/dp_60"
        android:layout_marginRight="@dimen/dp_60"
        android:fontFamily="sans-serif-medium"
        android:gravity="center"
        android:maxLines="1"
        android:text=""
        android:textColor="@color/text_FF000000"
        android:textSize="@dimen/text_18" />
    <!--3.更多按钮 默认隐藏-->
    <LinearLayout
        android:id="@+id/top_more_btn"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentEnd="true"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:src="@drawable/add"
        android:visibility="gone">
        <ImageView
            android:id="@+id/top_more_iv"
            android:layout_width="@dimen/dp_28"
            android:layout_height="@dimen/dp_28"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:adjustViewBounds="true"
            android:scaleType="centerInside" />
    </LinearLayout>
</RelativeLayout>
app/src/main/res/layout/toolbar_top_view_52.xml
New file
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/top_bar_view"
    android:layout_width="match_parent"
    android:layout_height="@dimen/dp_52"
    android:background="@color/text_245EC3"
    android:orientation="horizontal">
    <!--1.返回按钮 增大点击区域-->
    <LinearLayout
        android:id="@+id/top_back_btn"
        android:layout_width="@dimen/dp_56"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:visibility="gone">
        <ImageView
            android:layout_width="@dimen/dp_24"
            android:layout_height="@dimen/dp_24"
            android:layout_gravity="center"
            android:layout_marginLeft="@dimen/dp_16"
            android:scaleType="centerInside" />
    </LinearLayout>
    <!--2.标题文本-->
    <TextView
        android:id="@+id/top_title_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_marginLeft="@dimen/dp_60"
        android:layout_marginRight="@dimen/dp_60"
        android:fontFamily="sans-serif-medium"
        android:gravity="center"
        android:maxLines="1"
        android:text="@string/my_power_station_我的电站"
        android:textColor="@color/text_FFFFFFFF"
        android:textSize="@dimen/text_18" />
    <!--3.更多按钮 默认隐藏-->
    <LinearLayout
        android:id="@+id/top_more_btn"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentEnd="true"
        android:gravity="center_vertical"
        android:orientation="horizontal">
        <ImageView
            android:id="@+id/top_more_iv"
            android:layout_width="@dimen/dp_28"
            android:layout_height="@dimen/dp_28"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:adjustViewBounds="true"
            android:scaleType="centerInside"
            android:visibility="gone" />
    </LinearLayout>
</RelativeLayout>
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary files differ
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary files differ
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary files differ
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary files differ
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary files differ
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary files differ
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary files differ
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary files differ
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary files differ
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary files differ
app/src/main/res/navigation/nav_graph.xml
New file
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation 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:id="@+id/nav_graph"
    app:startDestination="@id/FirstFragment">
    <fragment
        android:id="@+id/FirstFragment"
        android:name="com.example.photovoltaic.ui.Login.FirstFragment"
        android:label="@string/first_fragment_label"
        tools:layout="@layout/fragment_first" >
        <action
            android:id="@+id/action_FirstFragment_to_SecondFragment"
            app:destination="@id/SecondFragment" />
    </fragment>
    <fragment
        android:id="@+id/SecondFragment"
        android:name="com.example.photovoltaic.ui.Login.SecondFragment"
        android:label="@string/second_fragment_label"
        tools:layout="@layout/fragment_second" >
        <action
            android:id="@+id/action_SecondFragment_to_FirstFragment"
            app:destination="@id/FirstFragment" />
    </fragment>
</navigation>
app/src/main/res/values-land/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
        <dimen name="fab_margin">48dp</dimen>
    </resources>
app/src/main/res/values-night/themes.xml
New file
@@ -0,0 +1,21 @@
<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.PhotovoltaicDebug" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_200</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/black</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_200</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
    </style>
    <style name="ThemeOverlay.PhotovoltaicDebug.FullscreenContainer" parent="">
        <item name="fullscreenBackgroundColor">@color/light_blue_900</item>
        <item name="fullscreenTextColor">@color/light_blue_A400</item>
    </style>
</resources>
app/src/main/res/values-w1240dp/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
        <dimen name="fab_margin">200dp</dimen>
    </resources>
app/src/main/res/values-w600dp/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
        <dimen name="fab_margin">48dp</dimen>
    </resources>
app/src/main/res/values/attrs.xml
New file
@@ -0,0 +1,6 @@
<resources>
    <declare-styleable name="FullscreenAttrs">
        <attr name="fullscreenBackgroundColor" format="color" />
        <attr name="fullscreenTextColor" format="color" />
    </declare-styleable>
</resources>
app/src/main/res/values/colors.xml
New file
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="purple_200">#FFBB86FC</color>
    <color name="purple_500">#FF6200EE</color>
    <color name="purple_700">#FF3700B3</color>
    <color name="teal_200">#FF03DAC5</color>
    <color name="teal_700">#FF018786</color>
    <color name="black">#FF000000</color>
    <color name="white">#FFFFFFFF</color>
    <color name="light_blue_600">#FF039BE5</color>
    <color name="light_blue_900">#FF01579B</color>
    <color name="light_blue_A200">#FF40C4FF</color>
    <color name="light_blue_A400">#FF00B0FF</color>
    <color name="black_overlay">#66000000</color>
    <color name="text_245EC3">#245EC3</color>
    <color name="text_25000000">#25000000</color>
    <color name="text_40000000">#40000000</color>
    <color name="text_65000000">#65000000</color>
    <color name="text_90000000">#90000000</color>
    <color name="text_FF000000">#FF000000</color>
    <color name="text_E1E1E1">#E1E1E1</color>
    <color name="text_94B6E7">#94B6E7</color>
    <color name="text_FFFFFFFF">#FFFFFFFF</color>
    <color name="text_D34545">#D34545</color>
    <color name="text_FFB300">#FFB300</color>
    <color name="text_B9B9B9">#B9B9B9</color>
    <color name="text_E34343">#E34343</color>
    <color name="text_06B92A">#06B92A</color>
    <color name="text_F9FAFB">#F9FAFB</color>
    <color name="text_CBCDD1">#CBCDD1</color>/
    <color name="text_FF245EC3">#FF245EC3</color>
</resources>
app/src/main/res/values/dimens.xml
New file
@@ -0,0 +1,162 @@
<resources>
    <dimen name="fab_margin">16dp</dimen>
    <dimen name="dp_line">0.5dp</dimen>
    <dimen name="dp_0_5">0.5dp</dimen>
    <dimen name="dp_0">0dp</dimen>
    <dimen name="dp_1">1dp</dimen>
    <dimen name="dp_2">2dp</dimen>
    <dimen name="dp_3">3dp</dimen>
    <dimen name="dp_4">4dp</dimen>
    <dimen name="dp_5">5dp</dimen>
    <dimen name="dp_6">6dp</dimen>
    <dimen name="dp_7">7dp</dimen>
    <dimen name="dp_8">8dp</dimen>
    <dimen name="dp_9">9dp</dimen>
    <dimen name="dp_10">10dp</dimen>
    <dimen name="dp_11">11dp</dimen>
    <dimen name="dp_12">12dp</dimen>
    <dimen name="dp_13">13dp</dimen>
    <dimen name="dp_14">14dp</dimen>
    <dimen name="dp_15">15dp</dimen>
    <dimen name="dp_16">16dp</dimen>
    <dimen name="dp_17">17dp</dimen>
    <dimen name="dp_18">18dp</dimen>
    <dimen name="dp_19">19dp</dimen>
    <dimen name="dp_20">20dp</dimen>
    <dimen name="dp_21">21dp</dimen>
    <dimen name="dp_22">22dp</dimen>
    <dimen name="dp_23">23dp</dimen>
    <dimen name="dp_24">24dp</dimen>
    <dimen name="dp_25">25dp</dimen>
    <dimen name="dp_26">26dp</dimen>
    <dimen name="dp_27">27dp</dimen>
    <dimen name="dp_28">28dp</dimen>
    <dimen name="dp_29">29dp</dimen>
    <dimen name="dp_30">30dp</dimen>
    <dimen name="dp_31">31dp</dimen>
    <dimen name="dp_32">32dp</dimen>
    <dimen name="dp_33">33dp</dimen>
    <dimen name="dp_34">34dp</dimen>
    <dimen name="dp_35">35dp</dimen>
    <dimen name="dp_36">36dp</dimen>
    <dimen name="dp_37">37dp</dimen>
    <dimen name="dp_38">38dp</dimen>
    <dimen name="dp_39">39dp</dimen>
    <dimen name="dp_40">40dp</dimen>
    <dimen name="dp_41">41dp</dimen>
    <dimen name="dp_42">42dp</dimen>
    <dimen name="dp_43">43dp</dimen>
    <dimen name="dp_44">44dp</dimen>
    <dimen name="dp_45">45dp</dimen>
    <dimen name="dp_46">46dp</dimen>
    <dimen name="dp_47">47dp</dimen>
    <dimen name="dp_48">48dp</dimen>
    <dimen name="dp_49">49dp</dimen>
    <dimen name="dp_50">50dp</dimen>
    <dimen name="dp_51">51dp</dimen>
    <dimen name="dp_52">52dp</dimen>
    <dimen name="dp_54">54dp</dimen>
    <dimen name="dp_55">55dp</dimen>
    <dimen name="dp_56">56dp</dimen>
    <dimen name="dp_57">57dp</dimen>
    <dimen name="dp_58">58dp</dimen>
    <dimen name="dp_60">60dp</dimen>
    <dimen name="dp_62">62dp</dimen>
    <dimen name="dp_63">63dp</dimen>
    <dimen name="dp_64">64dp</dimen>
    <dimen name="dp_65">65dp</dimen>
    <dimen name="dp_66">66dp</dimen>
    <dimen name="dp_68">68dp</dimen>
    <dimen name="dp_70">70dp</dimen>
    <dimen name="dp_74">74dp</dimen>
    <dimen name="dp_75">75dp</dimen>
    <dimen name="dp_76">76dp</dimen>
    <dimen name="dp_80">80dp</dimen>
    <dimen name="dp_83">83dp</dimen>
    <dimen name="dp_85">85dp</dimen>
    <dimen name="dp_86">86dp</dimen>
    <dimen name="dp_87">87dp</dimen>
    <dimen name="dp_89">89dp</dimen>
    <dimen name="dp_90">90dp</dimen>
    <dimen name="dp_96">96dp</dimen>
    <dimen name="dp_99">99dp</dimen>
    <dimen name="dp_100">100dp</dimen>
    <dimen name="dp_104">104dp</dimen>
    <dimen name="dp_107">107dp</dimen>
    <dimen name="dp_108">108dp</dimen>
    <dimen name="dp_110">110dp</dimen>
    <dimen name="dp_112">112dp</dimen>
    <dimen name="dp_115">115dp</dimen>
    <dimen name="dp_116">116dp</dimen>
    <dimen name="dp_117">117dp</dimen>
    <dimen name="dp_119">119dp</dimen>
    <dimen name="dp_120">120dp</dimen>
    <dimen name="dp_126">126dp</dimen>
    <dimen name="dp_127">127dp</dimen>
    <dimen name="dp_128">128dp</dimen>
    <dimen name="dp_131">131dp</dimen>
    <dimen name="dp_133">133dp</dimen>
    <dimen name="dp_134">134dp</dimen>
    <dimen name="dp_135">135dp</dimen>
    <dimen name="dp_140">140dp</dimen>
    <dimen name="dp_141">141dp</dimen>
    <dimen name="dp_145">145dp</dimen>
    <dimen name="dp_147">147dp</dimen>
    <dimen name="dp_148">148dp</dimen>
    <dimen name="dp_150">150dp</dimen>
    <dimen name="dp_155">155dp</dimen>
    <dimen name="dp_160">160dp</dimen>
    <dimen name="dp_162">162dp</dimen>
    <dimen name="dp_164">164dp</dimen>
    <dimen name="dp_166">166dp</dimen>
    <dimen name="dp_171">171dp</dimen>
    <dimen name="dp_177">177dp</dimen>
    <dimen name="dp_178">178dp</dimen>
    <dimen name="dp_180">180dp</dimen>
    <dimen name="dp_184">184dp</dimen>
    <dimen name="dp_192">192dp</dimen>
    <dimen name="dp_198">198dp</dimen>
    <dimen name="dp_200">200dp</dimen>
    <dimen name="dp_202">202dp</dimen>
    <dimen name="dp_208">208dp</dimen>
    <dimen name="dp_210">210dp</dimen>
    <dimen name="dp_212">212dp</dimen>
    <dimen name="dp_214">214dp</dimen>
    <dimen name="dp_220">220dp</dimen>
    <dimen name="dp_235">235dp</dimen>
    <dimen name="dp_237">237dp</dimen>
    <dimen name="dp_244">244dp</dimen>
    <dimen name="dp_267">267dp</dimen>
    <dimen name="dp_284">284dp</dimen>
    <dimen name="dp_292">292dp</dimen>
    <dimen name="dp_295">295dp</dimen>
    <dimen name="dp_299">299dp</dimen>
    <dimen name="dp_311">311dp</dimen>
    <dimen name="dp_339">339dp</dimen>
    <dimen name="dp_400">400dp</dimen>
    <!--字体大小-->
    <dimen name="text_10">10sp</dimen>
    <dimen name="text_11">11sp</dimen>
    <dimen name="text_12">12sp</dimen>
    <dimen name="text_13">13sp</dimen>
    <dimen name="text_14">14sp</dimen>
    <dimen name="text_15">15sp</dimen>
    <dimen name="text_16">16sp</dimen>
    <dimen name="text_17">17sp</dimen>
    <dimen name="text_18">18sp</dimen>
    <dimen name="text_19">19sp</dimen>
    <dimen name="text_20">20sp</dimen>
    <dimen name="text_21">21sp</dimen>
    <dimen name="text_22">22sp</dimen>
    <dimen name="text_23">23sp</dimen>
    <dimen name="text_24">24sp</dimen>
    <dimen name="text_25">25sp</dimen>
    <dimen name="text_26">26sp</dimen>
    <dimen name="text_27">27sp</dimen>
    <dimen name="text_28">28sp</dimen>
    <dimen name="text_29">29sp</dimen>
    <dimen name="text_30">30sp</dimen>
</resources>
app/src/main/res/values/strings.xml
New file
@@ -0,0 +1,53 @@
<resources>
    <string name="app_name">PhotovoltaicDebug</string>
    <string name="title_activity_home_login">HomeLoginActivity</string>
    <!-- Strings used for fragments for navigation -->
    <string name="first_fragment_label">First Fragment</string>
    <string name="second_fragment_label">Second Fragment</string>
    <string name="next">Next</string>
    <string name="previous">Previous</string>
    <string name="hello_first_fragment">Hello first fragment</string>
    <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
    <!--登录模块-->
    <string name="home_login_中文">中文(简体)</string>
    <string name="home_login_HDL光伏储能">HDL光伏储能</string>
    <string name="home_login_我是安装商">我是安装商</string>
    <string name="home_login_请输入手机号_邮箱号">请输入手机号/邮箱号</string>
    <string name="home_login_请输入手机号">请输入手机号</string>
    <string name="home_login_邮箱号">邮箱号</string>
    <string name="home_login_请输入密码">请输入密码</string>
    <string name="home_login_注册">注册</string>
    <string name="home_login_忘记密码">忘记密码</string>
    <string name="home_login_登录">登录</string>
    <string name="home_login_体验电站">体验电站</string>
    <string name="home_login_同意_服务协议">同意《服务协议》和《用户信息保护规定》</string>
    <string name="home_login_error_账号不能为空">账号不能为空.</string>
    <string name="home_login_error_密码不能为空">密码不能为空.</string>
    <string name="home_login_error_账号或者密码不对">账号或者密码不对,请重新输入.</string>
    <string name="home_login_error_最少6_16个字符">密码不符合最低安全要求,最少6–16个字符.</string>
    <string name="home_login_error_密码不能小于6个字符">密码不能小于6个字符.</string>
    <string name="home_login_error_密码不能大于16个字符">密码不能大于16个字符.</string>
    <!--我的电站-->
    <string name="my_power_station_电站">电站</string>
    <string name="my_power_station_我的">我的</string>
    <string name="my_power_station_我的电站">我的电站</string>
    <string name="my_power_station_发电功率">发电功率</string>
    <string name="my_power_station_今日发电">今日发电</string>
    <string name="my_power_station_创建时间">创建时间</string>
    <string name="my_power_station_装机容量">装机容量</string>
    <string name="my_power_station_连接中">连接中</string>
    <string name="my_power_station_离线">离线</string>
    <string name="my_power_station_故障">故障</string>
    <string name="my_power_station_运行">运行</string>
    <!--我的-->
    <string name="me_我的">我的</string>
    <string name="me_设置">设置</string>
    <string name="me_关于">关于</string>
</resources>
app/src/main/res/values/styles.xml
New file
@@ -0,0 +1,7 @@
<resources>
    <style name="Widget.Theme.PhotovoltaicDebug.ButtonBar.Fullscreen" parent="">
        <item name="android:background">@color/black_overlay</item>
        <item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item>
    </style>
</resources>
app/src/main/res/values/themes.xml
New file
@@ -0,0 +1,30 @@
<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.PhotovoltaicDebug" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_700</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
    </style>
    <style name="Theme.PhotovoltaicDebug.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="Theme.PhotovoltaicDebug.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
    <style name="Theme.PhotovoltaicDebug.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
    <style name="ThemeOverlay.PhotovoltaicDebug.FullscreenContainer" parent="">
        <item name="fullscreenBackgroundColor">@color/light_blue_600</item>
        <item name="fullscreenTextColor">@color/light_blue_A200</item>
    </style>
</resources>
app/src/test/java/com/example/photovoltaic/ExampleUnitTest.java
New file
@@ -0,0 +1,17 @@
package com.example.photovoltaic;
import org.junit.Test;
import static org.junit.Assert.*;
/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class ExampleUnitTest {
    @Test
    public void addition_isCorrect() {
        assertEquals(4, 2 + 2);
    }
}
build.gradle
New file
@@ -0,0 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.1.3' apply false
    id 'com.android.library' version '7.1.3' apply false
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
gradle.properties
New file
@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
gradle/wrapper/gradle-wrapper.jar
Binary files differ
gradle/wrapper/gradle-wrapper.properties
New file
@@ -0,0 +1,6 @@
#Fri May 26 09:40:23 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
gradlew
New file
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
    echo "$*"
}
die () {
    echo
    echo "$*"
    echo
    exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`
    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=`expr $i + 1`
    done
    case $i in
        0) set -- ;;
        1) set -- "$args0" ;;
        2) set -- "$args0" "$args1" ;;
        3) set -- "$args0" "$args1" "$args2" ;;
        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi
# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
gradlew.bat
New file
@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
local.properties
New file
@@ -0,0 +1,10 @@
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Users/wenjucheng/Library/Android/sdk
settings.gradle
New file
@@ -0,0 +1,16 @@
pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
rootProject.name = "PhotovoltaicDebug"
include ':app'