Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad2bef81 authored by Dayona Joseph's avatar Dayona Joseph
Browse files

Remove energy score

parent 01f2aa41
Loading
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ class ApplicationActivity :
        setContentView(R.layout.activity_application)
        good_border.visibility=View.GONE
        neutral_border.visibility=View.GONE
        bad_border.visibility=View.GONE


        val toolbar = findViewById<Toolbar>(R.id.toolbar)
@@ -290,21 +289,6 @@ class ApplicationActivity :
                b.setTextColor(Color.parseColor("#0088ED"))
            }

            // TODO Set the app energy score
            app_energy_container.setOnClickListener {
                val alertDialog = AlertDialog.Builder(this).create()
                alertDialog.setIcon(R.drawable.ic_dialog_info)
                alertDialog.setTitle(R.string.app_energy_score)
                alertDialog.setMessage(getString(R.string.app_energy_description))
                alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(android.R.string.ok))
                { _, _ ->
                    alertDialog.dismiss()
                }
                alertDialog.show()
                var b = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
                b.setTextColor(Color.parseColor("#0088ED"))
            }

            // Load the app screenshots
            basicData.loadImagesAsyncly {
                showImages(it)
@@ -551,20 +535,6 @@ class ApplicationActivity :
            startActivity(intent)
        }


        // TODO Set the app energy score
        app_energy_container.setOnClickListener {
            val alertDialog = AlertDialog.Builder(this).create()
            alertDialog.setIcon(R.drawable.ic_dialog_info)
            alertDialog.setTitle(R.string.app_energy_score)
            alertDialog.setMessage(getString(R.string.app_energy_description))
            alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(android.R.string.ok))
            { _, _ ->
                alertDialog.dismiss()
            }
            alertDialog.show()
        }

        // Load the app screenshots
        pwasBasicData.loadImagesAsyncly {
            showImages(it)
+0 −76
Original line number Diff line number Diff line
@@ -520,82 +520,6 @@

                    </LinearLayout>

<!--                    <LinearLayout-->
<!--                        android:layout_width="wrap_content"-->
<!--                        android:layout_height="wrap_content"-->
<!--                        android:padding="20dp"/>-->

                    <LinearLayout
                        android:id="@+id/app_energy_container"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="?android:selectableItemBackground"
                        android:layout_weight="1"
                        android:orientation="vertical"
                        android:padding="@dimen/layout_padding_medium">

                        <RelativeLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="start">


                            <!-- TODO Don't set default background to red and text to N/A-->
                            <TextView
                                android:id="@+id/app_energy_score"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:maxLines="1"
                                android:layout_gravity="start"
                                android:text="@string/not_available"
                                android:textColor="@color/colorDarkGray"
                                android:textSize="@dimen/text_size_extra_large"
                                android:drawablePadding="5dp"
                                android:drawableRight="@drawable/app_border_bad"
                                tools:text="App energy" />



                            <com.makeramen.roundedimageview.RoundedImageView
                                android:id="@+id/bad_border"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:background="@drawable/app_border_bad"
                                android:ellipsize="end"
                                android:layout_gravity="center"
                                android:layout_toRightOf="@+id/app_energy_score"
                                />
                        </RelativeLayout>


                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/layout_margin_medium"
                            android:layout_gravity="start"
                            android:orientation="horizontal">

                            <ImageView
                                android:layout_width="16dp"
                                android:layout_height="16dp"
                                android:contentDescription="@string/app_energy_score_content_description"
                                android:src="@drawable/ic_app_energy"
                                android:tint="@android:color/darker_gray"/>

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="@dimen/layout_margin_medium"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:text="@string/app_energy_score"
                                android:textColor="@android:color/darker_gray"
                                android:textSize="@dimen/text_size_small" />

                        </LinearLayout>

                    </LinearLayout>

                </LinearLayout>

            </LinearLayout>