-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Iscle <[email protected]>
- Loading branch information
Showing
92 changed files
with
1,497 additions
and
1,161 deletions.
There are no files selected for viewing
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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/aof/mcinabox/activity/LoginActivity.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.aof.mcinabox.activity; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.aof.mcinabox.databinding.ActivityLoginBinding; | ||
|
||
public class LoginActivity extends AppCompatActivity { | ||
|
||
private ActivityLoginBinding binding; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
binding = ActivityLoginBinding.inflate(getLayoutInflater()); | ||
setContentView(binding.getRoot()); | ||
} | ||
} |
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
34 changes: 34 additions & 0 deletions
34
app/src/main/java/com/aof/mcinabox/adapter/SettingsAdapter.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.aof.mcinabox.adapter; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.fragment.app.Fragment; | ||
import androidx.viewpager2.adapter.FragmentStateAdapter; | ||
|
||
import com.aof.mcinabox.fragment.AccountSettingsFragment; | ||
import com.aof.mcinabox.fragment.HomeFragment; | ||
|
||
public class SettingsAdapter extends FragmentStateAdapter { | ||
|
||
public SettingsAdapter(@NonNull Fragment fragment) { | ||
super(fragment); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Fragment createFragment(int position) { | ||
switch (position) { | ||
case 0: | ||
return new AccountSettingsFragment(); | ||
case 1: | ||
return new HomeFragment(); | ||
case 2: | ||
return new AccountSettingsFragment(); | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public int getItemCount() { | ||
return 3; | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/aof/mcinabox/fragment/AccountSettingsFragment.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.aof.mcinabox.fragment; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.aof.mcinabox.R; | ||
|
||
public class AccountSettingsFragment extends BasePreferenceFragment { | ||
private static final String TAG = "AccountSettingsFragment"; | ||
|
||
@Override | ||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||
setPreferencesFromResource(R.xml.account_preferences, rootKey); | ||
} | ||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/aof/mcinabox/fragment/BasePreferenceFragment.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.aof.mcinabox.fragment; | ||
|
||
import androidx.preference.PreferenceFragmentCompat; | ||
|
||
import com.aof.mcinabox.MCinaBox; | ||
|
||
public abstract class BasePreferenceFragment extends PreferenceFragmentCompat { | ||
|
||
public BasePreferenceFragment() { | ||
super(); | ||
} | ||
|
||
public MCinaBox getMCinaBox() { | ||
return (MCinaBox) getActivity().getApplication(); | ||
} | ||
} |
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.