Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: Made preference activities navigational using a controller.
- Loading branch information
Showing
5 changed files
with
110 additions
and
22 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:focusable="true" | |||
android:focusableInTouchMode="true" | |||
android:orientation="vertical" > | |||
<View | |||
android:layout_width="match_parent" | |||
android:layout_height="1dp" | |||
android:layout_marginTop="6dp" | |||
android:background="#747273" /> | |||
<TextView | |||
android:id="@+android:id/title" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:gravity="center_vertical" | |||
android:padding="12dp" | |||
android:textColor="?attr/colorAccent" | |||
android:textSize="20sp" | |||
android:textStyle="bold" /> | |||
</LinearLayout> |
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
59 changes: 59 additions & 0 deletions
59
src/paulscode/android/mupen64plusae/preference/CustomPreferenceCategory.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,59 @@ | |||
/** | |||
* Mupen64PlusAE, an N64 emulator for the Android platform | |||
* | |||
* Copyright (C) 2013 Paul Lamb | |||
* | |||
* This file is part of Mupen64PlusAE. | |||
* | |||
* Mupen64PlusAE is free software: you can redistribute it and/or modify it under the terms of the | |||
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | |||
* License, or (at your option) any later version. | |||
* | |||
* Mupen64PlusAE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | |||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License along with Mupen64PlusAE. If | |||
* not, see <http://www.gnu.org/licenses/>. | |||
* | |||
* Authors: fzurita | |||
*/ | |||
package paulscode.android.mupen64plusae.preference; | |||
|
|||
import org.mupen64plusae.v3.alpha.R; | |||
|
|||
import android.content.Context; | |||
import android.support.v7.preference.PreferenceCategory; | |||
import android.util.AttributeSet; | |||
|
|||
/** | |||
* A type of {@link PreferenceCategory} that is focusable | |||
*/ | |||
|
|||
public class CustomPreferenceCategory extends PreferenceCategory | |||
{ | |||
/** | |||
* Constructor | |||
* | |||
* @param context The {@link Context} this CustomPreferenceCategory is being used in. | |||
* @param attrs A collection of attributes, as found associated with a tag in an XML document. | |||
*/ | |||
public CustomPreferenceCategory( Context context, AttributeSet attrs ) | |||
{ | |||
super( context, attrs); | |||
setLayoutResource(R.layout.custom_preference_category); | |||
setSelectable(true); | |||
} | |||
|
|||
/** | |||
* Constructor | |||
* | |||
* @param context The {@link Context} this CustomPreferenceCategory will be used in. | |||
*/ | |||
public CustomPreferenceCategory( Context context ) | |||
{ | |||
super( context ); | |||
setLayoutResource(R.layout.custom_preference_category); | |||
setSelectable(true); | |||
} | |||
} |