From 4eced52c5fa76ec39a123e0f41f1eec9de608252 Mon Sep 17 00:00:00 2001 From: agnostic-apollo Date: Wed, 24 Mar 2021 05:28:38 +0500 Subject: [PATCH] Fix xml files naming convention --- app/src/main/java/com/termux/app/TermuxActivity.java | 2 +- .../java/com/termux/app/activities/SettingsActivity.java | 2 +- .../app/terminal/TermuxSessionsListViewController.java | 6 +++--- .../termux/app/terminal/io/TerminalToolbarViewPager.java | 4 ++-- ...ound_black.xml => session_background_black_selected.xml} | 0 ...ssion_background.xml => session_background_selected.xml} | 0 app/src/main/res/layout/activity_report.xml | 2 +- .../layout/{settings_activity.xml => activity_settings.xml} | 0 .../res/layout/{termux_activity.xml => activity_termux.xml} | 0 ...ssions_list_item.xml => item_terminal_sessions_list.xml} | 2 +- .../res/layout/{toolbar_layout.xml => partial_toolbar.xml} | 0 ...a_keys_view.xml => view_terminal_toolbar_extra_keys.xml} | 0 ..._input_view.xml => view_terminal_toolbar_text_input.xml} | 0 13 files changed, 9 insertions(+), 9 deletions(-) rename app/src/main/res/drawable/{selected_session_background_black.xml => session_background_black_selected.xml} (100%) rename app/src/main/res/drawable/{selected_session_background.xml => session_background_selected.xml} (100%) rename app/src/main/res/layout/{settings_activity.xml => activity_settings.xml} (100%) rename app/src/main/res/layout/{termux_activity.xml => activity_termux.xml} (100%) rename app/src/main/res/layout/{terminal_sessions_list_item.xml => item_terminal_sessions_list.xml} (84%) rename app/src/main/res/layout/{toolbar_layout.xml => partial_toolbar.xml} (100%) rename app/src/main/res/layout/{terminal_toolbar_extra_keys_view.xml => view_terminal_toolbar_extra_keys.xml} (100%) rename app/src/main/res/layout/{terminal_toolbar_text_input_view.xml => view_terminal_toolbar_text_input.xml} (100%) diff --git a/app/src/main/java/com/termux/app/TermuxActivity.java b/app/src/main/java/com/termux/app/TermuxActivity.java index e5e1ed902b..b87ba14515 100644 --- a/app/src/main/java/com/termux/app/TermuxActivity.java +++ b/app/src/main/java/com/termux/app/TermuxActivity.java @@ -163,7 +163,7 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.termux_activity); + setContentView(R.layout.activity_termux); View content = findViewById(android.R.id.content); content.setOnApplyWindowInsetsListener((v, insets) -> { diff --git a/app/src/main/java/com/termux/app/activities/SettingsActivity.java b/app/src/main/java/com/termux/app/activities/SettingsActivity.java index 7111a7b98a..b30b1a5799 100644 --- a/app/src/main/java/com/termux/app/activities/SettingsActivity.java +++ b/app/src/main/java/com/termux/app/activities/SettingsActivity.java @@ -13,7 +13,7 @@ public class SettingsActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.settings_activity); + setContentView(R.layout.activity_settings); if (savedInstanceState == null) { getSupportFragmentManager() .beginTransaction() diff --git a/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java b/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java index 1216193a59..9951b07132 100644 --- a/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java +++ b/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java @@ -32,7 +32,7 @@ public class TermuxSessionsListViewController extends ArrayAdapter sessionList) { - super(activity.getApplicationContext(), R.layout.terminal_sessions_list_item, sessionList); + super(activity.getApplicationContext(), R.layout.item_terminal_sessions_list, sessionList); this.mActivity = activity; } @@ -43,7 +43,7 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) { View sessionRowView = convertView; if (sessionRowView == null) { LayoutInflater inflater = mActivity.getLayoutInflater(); - sessionRowView = inflater.inflate(R.layout.terminal_sessions_list_item, parent, false); + sessionRowView = inflater.inflate(R.layout.item_terminal_sessions_list, parent, false); } TextView sessionTitleView = sessionRowView.findViewById(R.id.session_title); @@ -58,7 +58,7 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) { if (isUsingBlackUI) { sessionTitleView.setBackground( - ContextCompat.getDrawable(mActivity, R.drawable.selected_session_background_black) + ContextCompat.getDrawable(mActivity, R.drawable.session_background_black_selected) ); } diff --git a/app/src/main/java/com/termux/app/terminal/io/TerminalToolbarViewPager.java b/app/src/main/java/com/termux/app/terminal/io/TerminalToolbarViewPager.java index e53fbbcd07..1e23220d5f 100644 --- a/app/src/main/java/com/termux/app/terminal/io/TerminalToolbarViewPager.java +++ b/app/src/main/java/com/termux/app/terminal/io/TerminalToolbarViewPager.java @@ -42,7 +42,7 @@ public Object instantiateItem(@NonNull ViewGroup collection, int position) { LayoutInflater inflater = LayoutInflater.from(mActivity); View layout; if (position == 0) { - layout = inflater.inflate(R.layout.terminal_toolbar_extra_keys_view, collection, false); + layout = inflater.inflate(R.layout.view_terminal_toolbar_extra_keys, collection, false); ExtraKeysView extraKeysView = (ExtraKeysView) layout; mActivity.setExtraKeysView(extraKeysView); extraKeysView.reload(mActivity.getProperties().getExtraKeysInfo()); @@ -53,7 +53,7 @@ public Object instantiateItem(@NonNull ViewGroup collection, int position) { } } else { - layout = inflater.inflate(R.layout.terminal_toolbar_text_input_view, collection, false); + layout = inflater.inflate(R.layout.view_terminal_toolbar_text_input, collection, false); final EditText editText = layout.findViewById(R.id.terminal_toolbar_text_input); if(mSavedTextInput != null) { diff --git a/app/src/main/res/drawable/selected_session_background_black.xml b/app/src/main/res/drawable/session_background_black_selected.xml similarity index 100% rename from app/src/main/res/drawable/selected_session_background_black.xml rename to app/src/main/res/drawable/session_background_black_selected.xml diff --git a/app/src/main/res/drawable/selected_session_background.xml b/app/src/main/res/drawable/session_background_selected.xml similarity index 100% rename from app/src/main/res/drawable/selected_session_background.xml rename to app/src/main/res/drawable/session_background_selected.xml diff --git a/app/src/main/res/layout/activity_report.xml b/app/src/main/res/layout/activity_report.xml index b442a324d8..43fff0351d 100644 --- a/app/src/main/res/layout/activity_report.xml +++ b/app/src/main/res/layout/activity_report.xml @@ -5,7 +5,7 @@ android:orientation="vertical">