Skip to content

Commit

Permalink
Adjust UI
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Apr 25, 2024
1 parent 0eb40ae commit c260e44
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 36 deletions.
Expand Up @@ -73,9 +73,9 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter<Mai
holder.itemMainBinding.tvTestResult.setTextColor(ContextCompat.getColor(mActivity, R.color.colorPing))
}
if (guid == mainStorage?.decodeString(MmkvManager.KEY_SELECTED_SERVER)) {
holder.itemMainBinding.layoutIndicator.setBackgroundResource(R.color.colorSelected)
holder.itemMainBinding.layoutIndicator.setBackgroundResource(R.color.colorAccent)
} else {
holder.itemMainBinding.layoutIndicator.setBackgroundResource(R.color.colorUnselected)
holder.itemMainBinding.layoutIndicator.setBackgroundResource(0)
}
holder.itemMainBinding.tvSubscription.text = ""
val json = subStorage?.decodeString(config.subscriptionId)
Expand Down
Expand Up @@ -5,17 +5,15 @@ import android.graphics.Color
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.RecyclerView
import com.google.gson.Gson
import com.tencent.mmkv.MMKV
import com.v2ray.ang.R
import com.v2ray.ang.databinding.ItemQrcodeBinding
import com.v2ray.ang.databinding.ItemRecyclerSubSettingBinding
import com.v2ray.ang.dto.EConfigType
import com.v2ray.ang.extension.toast
import com.v2ray.ang.util.AngConfigManager
import com.v2ray.ang.util.MmkvManager
import com.v2ray.ang.util.QRCodeDecoder
import com.v2ray.ang.util.Utils
Expand All @@ -38,9 +36,9 @@ class SubSettingRecyclerAdapter(val activity: SubSettingActivity) :
holder.itemSubSettingBinding.tvName.text = subItem.remarks
holder.itemSubSettingBinding.tvUrl.text = subItem.url
if (subItem.enabled) {
holder.itemSubSettingBinding.chkEnable.setBackgroundResource(R.color.colorSelected)
holder.itemSubSettingBinding.chkEnable.setBackgroundResource(R.color.colorAccent)
} else {
holder.itemSubSettingBinding.chkEnable.setBackgroundResource(R.color.colorUnselected)
holder.itemSubSettingBinding.chkEnable.setBackgroundResource(0)
}
holder.itemView.setBackgroundColor(Color.TRANSPARENT)

Expand Down
6 changes: 0 additions & 6 deletions V2rayNG/app/src/main/res/layout/activity_about.xml
Expand Up @@ -15,7 +15,6 @@
android:id="@+id/layout_backup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand Down Expand Up @@ -56,7 +55,6 @@
android:id="@+id/layout_restore"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand Down Expand Up @@ -89,7 +87,6 @@
android:id="@+id/layout_soure_ccode"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand All @@ -114,7 +111,6 @@
android:id="@+id/layout_feedback"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand All @@ -140,7 +136,6 @@
android:id="@+id/layout_tg_channel"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand All @@ -165,7 +160,6 @@
android:id="@+id/layout_privacy_policy"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand Down
2 changes: 1 addition & 1 deletion V2rayNG/app/src/main/res/layout/activity_logcat.xml
Expand Up @@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:paddingStart="10dp"
android:paddingEnd="10dp"
tools:context=".ui.MainActivity">
tools:context=".ui.LogcatActivity">

<ProgressBar
android:id="@+id/pb_waiting"
Expand Down
Expand Up @@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.ServerActivity">
tools:context=".ui.ServerCustomConfigActivity">

<LinearLayout
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion V2rayNG/app/src/main/res/layout/activity_sub_edit.xml
Expand Up @@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.ServerActivity">
tools:context=".ui.SubSettingActivity">

<LinearLayout
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion V2rayNG/app/src/main/res/layout/activity_sub_setting.xml
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.MainActivity">
tools:context=".ui.SubSettingActivity">

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
Expand Down
Expand Up @@ -3,7 +3,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:background="@color/colorPrimary"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
Expand Down
3 changes: 1 addition & 2 deletions V2rayNG/app/src/main/res/layout/item_recycler_main.xml
Expand Up @@ -11,15 +11,14 @@
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:layout_margin="1dp"
app:cardCornerRadius="5dp">

<LinearLayout
android:id="@+id/info_container"
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:layout_gravity="center"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand Down
Expand Up @@ -10,7 +10,7 @@
android:id="@+id/item_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:layout_margin="1dp"
android:orientation="horizontal"
card_view:cardCornerRadius="5dp">

Expand All @@ -19,7 +19,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/server_height"
android:layout_gravity="center"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
Expand Down
3 changes: 1 addition & 2 deletions V2rayNG/app/src/main/res/layout/item_recycler_user_asset.xml
Expand Up @@ -8,13 +8,12 @@
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:layout_margin="1dp"
app:cardCornerRadius="5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:foreground="?attr/selectableItemBackground"
android:gravity="center"
android:orientation="horizontal"
Expand Down
2 changes: 1 addition & 1 deletion V2rayNG/app/src/main/res/layout/widget_switch.xml
Expand Up @@ -26,6 +26,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="@color/colorWidgetText"
android:textColor="@android:color/white"
android:textSize="10sp" />
</LinearLayout>
5 changes: 1 addition & 4 deletions V2rayNG/app/src/main/res/values-night/colors.xml
Expand Up @@ -3,10 +3,7 @@
<color name="color_fab_active">#f97910</color>
<color name="color_fab_inactive">#646464</color>
<color name="color_secondary">#BDBDBD</color>
<color name="colorSelected">#FFFFFF</color>
<color name="colorUnselected">#222222</color>

<color name="colorPrimary">#222222</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorPrimary">#212121</color>
<color name="colorAccent">#FFFFFF</color>
</resources>
1 change: 0 additions & 1 deletion V2rayNG/app/src/main/res/values-night/styles.xml
Expand Up @@ -3,7 +3,6 @@

<style name="AppThemeDayNight" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:navigationBarColor">@color/colorPrimary</item>
Expand Down
6 changes: 1 addition & 5 deletions V2rayNG/app/src/main/res/values/colors.xml
Expand Up @@ -3,15 +3,11 @@
<color name="colorPing">#009966</color>
<color name="colorPingRed">#FF0099</color>
<color name="colorConfigType">#f97910</color>
<color name="colorWidgetText">#FFFFFF</color>

<color name="color_fab_active">#f97910</color>
<color name="color_fab_inactive">#9C9C9C</color>
<color name="color_secondary">#727272</color>
<color name="colorSelected">#000000</color>
<color name="colorUnselected">#FFFFFF</color>

<color name="colorPrimary">#FFFFFF</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorPrimary">#F5F5F5</color>
<color name="colorAccent">#000000</color>
</resources>
1 change: 0 additions & 1 deletion V2rayNG/app/src/main/res/values/styles.xml
Expand Up @@ -2,7 +2,6 @@

<style name="AppThemeDayNight" parent="Theme.AppCompat.DayNight">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:navigationBarColor">@color/colorPrimary</item>
Expand Down

0 comments on commit c260e44

Please sign in to comment.