Skip to content

Commit

Permalink
Move activities and fragments to respective packages
Browse files Browse the repository at this point in the history
Move com.termux.TermuxSettingsActivity to com.termux.app.activities.SettingsActivity
Move com.termux.TermuxHepActivity to com.termux.app.activities.HelpActivity
Move com.termux.settings.DebuggingPreferencesFragment to com.termux.app.fragments.settings.DebuggingPreferencesFragment
  • Loading branch information
agnostic-apollo committed Mar 24, 2021
1 parent 1bdf9bf commit b856e16
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
</activity-alias>

<activity
android:name=".app.TermuxHelpActivity"
android:name=".app.activities.HelpActivity"
android:exported="false"
android:label="@string/application_name"
android:parentActivityName=".app.TermuxActivity"
android:resizeableActivity="true"
android:theme="@android:style/Theme.Material.Light.DarkActionBar" />

<activity
android:name=".app.TermuxSettingsActivity"
android:name=".app.activities.SettingsActivity"
android:label="@string/title_activity_termux_settings"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" />

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/com/termux/app/TermuxActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

import com.termux.R;
import com.termux.app.TermuxConstants.TERMUX_APP.TERMUX_ACTIVITY;
import com.termux.app.activities.HelpActivity;
import com.termux.app.activities.SettingsActivity;
import com.termux.app.settings.preferences.TermuxAppSharedPreferences;
import com.termux.app.terminal.TermuxSessionsListViewController;
import com.termux.app.terminal.io.TerminalToolbarViewPager;
Expand Down Expand Up @@ -529,10 +531,10 @@ public boolean onContextItemSelected(MenuItem item) {
showStylingDialog();
return true;
case CONTEXT_MENU_HELP_ID:
startActivity(new Intent(this, TermuxHelpActivity.class));
startActivity(new Intent(this, HelpActivity.class));
return true;
case CONTEXT_MENU_SETTINGS_ID:
startActivity(new Intent(this, TermuxSettingsActivity.class));
startActivity(new Intent(this, SettingsActivity.class));
return true;
case CONTEXT_MENU_TOGGLE_KEEP_SCREEN_ON:
toggleKeepScreenOn();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.termux.app;
package com.termux.app.activities;

import android.app.Activity;
import android.content.ActivityNotFoundException;
Expand All @@ -13,7 +13,7 @@
import android.widget.RelativeLayout;

/** Basic embedded browser for viewing help pages. */
public final class TermuxHelpActivity extends Activity {
public final class HelpActivity extends Activity {

WebView mWebView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.termux.app;
package com.termux.app.activities;

import android.os.Bundle;

Expand All @@ -8,7 +8,7 @@

import com.termux.R;

public class TermuxSettingsActivity extends AppCompatActivity {
public class SettingsActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.termux.app.settings;
package com.termux.app.fragments.settings;

import android.content.Context;
import android.os.Bundle;
Expand All @@ -11,7 +11,6 @@
import androidx.preference.PreferenceManager;

import com.termux.R;
import com.termux.app.settings.preferences.TermuxPreferenceConstants;
import com.termux.app.settings.preferences.TermuxAppSharedPreferences;
import com.termux.app.utils.Logger;

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<Preference
app:title="@string/debugging_preferences"
app:summary="Preferences for debugging"
app:fragment="com.termux.app.settings.DebuggingPreferencesFragment"/>
app:fragment="com.termux.app.fragments.settings.DebuggingPreferencesFragment"/>

</PreferenceScreen>

0 comments on commit b856e16

Please sign in to comment.