forked from Dev4Mod/WaEnhancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Dev4Mod:master' into theme
- Loading branch information
Showing
29 changed files
with
557 additions
and
292 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 55 additions & 5 deletions
60
app/src/main/java/com/wmods/wppenhacer/ui/fragments/GeneralFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,69 @@ | ||
package com.wmods.wppenhacer.ui.fragments; | ||
|
||
import android.os.Bundle; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import com.wmods.wppenhacer.R; | ||
import com.wmods.wppenhacer.ui.fragments.base.BaseFragment; | ||
import com.wmods.wppenhacer.ui.fragments.base.BasePreferenceFragment; | ||
|
||
public class GeneralFragment extends BasePreferenceFragment { | ||
|
||
public class GeneralFragment extends BaseFragment { | ||
|
||
@Nullable | ||
@Override | ||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) { | ||
super.onCreatePreferences(savedInstanceState, rootKey); | ||
setPreferencesFromResource(R.xml.fragment_general, rootKey); | ||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
var root = super.onCreateView(inflater, container, savedInstanceState); | ||
if (savedInstanceState == null) { | ||
getChildFragmentManager().beginTransaction().add(R.id.frag_container, new GeneralPreferenceFragment()).commitNow(); | ||
} | ||
return root; | ||
} | ||
|
||
public static class GeneralPreferenceFragment extends BasePreferenceFragment { | ||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
super.onCreatePreferences(savedInstanceState, rootKey); | ||
setPreferencesFromResource(R.xml.fragment_general, rootKey); | ||
|
||
} | ||
|
||
@Override | ||
public void onResume() { | ||
super.onResume(); | ||
setDisplayHomeAsUpEnabled(false); | ||
} | ||
} | ||
|
||
public static class HomeGeneralPreference extends BasePreferenceFragment { | ||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
super.onCreatePreferences(savedInstanceState, rootKey); | ||
setPreferencesFromResource(R.xml.preference_general_home, rootKey); | ||
setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
public static class HomeScreenGeneralPreference extends BasePreferenceFragment { | ||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
super.onCreatePreferences(savedInstanceState, rootKey); | ||
setPreferencesFromResource(R.xml.preference_general_homescreen, rootKey); | ||
setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
public static class ConversationGeneralPreference extends BasePreferenceFragment { | ||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
super.onCreatePreferences(savedInstanceState, rootKey); | ||
setPreferencesFromResource(R.xml.preference_general_conversation, rootKey); | ||
setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.