diff options
-rw-r--r-- | AndroidManifest.xml | 17 | ||||
-rw-r--r-- | res/layout-land/activity_player_base.xml | 184 | ||||
-rw-r--r-- | src/com/cyngn/eleven/ui/activities/HomeActivity.java | 6 | ||||
-rw-r--r-- | src/com/cyngn/eleven/ui/fragments/AudioPlayerFragment.java | 7 |
4 files changed, 13 insertions, 201 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 81c2a54..cd7f1ad 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -64,6 +64,7 @@ android:windowSoftInputMode="adjustPan" android:launchMode="singleTask" android:exported="true" + android:screenOrientation="portrait" android:theme="@style/Eleven.Theme.ActionBar.Overlay"> <intent-filter> <action android:name="android.intent.action.MAIN" /> @@ -133,13 +134,15 @@ <!-- Profile phone Activity --> <activity android:name=".ui.activities.ProfileActivity" - android:excludeFromRecents="true" /> + android:excludeFromRecents="true" + android:screenOrientation="portrait"/> <!-- Shortcut launcher Activity --> <activity android:name=".ui.activities.ShortcutActivity" android:excludeFromRecents="true" android:exported="true" - android:theme="@style/Theme.Transparent" > + android:theme="@style/Theme.Transparent" + android:screenOrientation="portrait"> <intent-filter> <action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" /> @@ -149,7 +152,8 @@ <!-- Search interface --> <activity android:name=".ui.activities.SearchActivity" - android:exported="true" > + android:exported="true" + android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.SEARCH" /> <action android:name="android.intent.action.MEDIA_SEARCH" /> @@ -165,11 +169,8 @@ <activity android:name=".ui.activities.SettingsActivity" android:label="@string/menu_settings" - android:theme="@style/Eleven.Theme" /> - <!-- Themes Activity --> - <activity - android:name=".ui.activities.ThemesActivity" - android:excludeFromRecents="true" /> + android:theme="@style/Eleven.Theme" + android:screenOrientation="portrait"/> <!-- 4x1 App Widget --> <receiver android:name="com.cyngn.eleven.appwidgets.AppWidgetSmall" diff --git a/res/layout-land/activity_player_base.xml b/res/layout-land/activity_player_base.xml deleted file mode 100644 index a2ef12f..0000000 --- a/res/layout-land/activity_player_base.xml +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2012 Andrew Neal - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" > - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent" > - - <RelativeLayout - android:id="@+id/audio_player_large_album_frame" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_alignParentLeft="true" > - - <com.cyngn.eleven.widgets.SquareImageView - android:id="@+id/audio_player_album_art" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignParentLeft="true" - android:scaleType="fitXY" /> - - <ImageView - android:layout_width="@dimen/shadow_height" - android:layout_height="match_parent" - android:layout_alignRight="@+id/audio_player_album_art" - android:contentDescription="@null" - android:src="@drawable/right_shadow" /> - </RelativeLayout> - - <FrameLayout - android:id="@+id/audio_player_pager_container" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_alignParentLeft="true" - android:layout_alignRight="@+id/audio_player_large_album_frame" - android:visibility="invisible" > - - <android.support.v4.view.ViewPager - android:id="@+id/audio_player_pager" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - - <ImageView - android:layout_width="@dimen/shadow_height" - android:layout_height="match_parent" - android:layout_gravity="right" - android:contentDescription="@null" - android:src="@drawable/right_shadow" /> - </FrameLayout> - - <View - android:id="@+id/audio_player_footer" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_alignParentRight="true" - android:layout_toRightOf="@+id/audio_player_large_album_frame" /> - - <LinearLayout - android:id="@+id/audio_player_header" - android:layout_width="match_parent" - android:layout_height="@dimen/audio_player_header_height" - android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:layout_toRightOf="@+id/audio_player_large_album_frame" - android:baselineAligned="false" - android:orientation="horizontal" - android:padding="0dp" > - - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:baselineAligned="false" - android:orientation="vertical" - android:paddingLeft="@dimen/audio_player_header_padding_left" - android:paddingRight="@dimen/audio_player_header_padding_right" > - - <TextView - android:id="@+id/audio_player_track_name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:ellipsize="end" - android:gravity="bottom" - android:singleLine="true" - android:textSize="@dimen/text_size_medium" - android:textStyle="bold" /> - - <TextView - android:id="@+id/audio_player_artist_name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:ellipsize="end" - android:gravity="top" - android:singleLine="true" - android:textSize="@dimen/text_size_medium" /> - </LinearLayout> - - <FrameLayout - android:id="@+id/audio_player_switch" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:focusable="true" - android:padding="@dimen/audio_player_switch_padding" > - - <com.cyngn.eleven.widgets.SquareImageView - android:id="@+id/audio_player_switch_queue" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:contentDescription="@null" /> - - <com.cyngn.eleven.widgets.SquareImageView - android:id="@+id/audio_player_switch_album_art" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:visibility="invisible" /> - </FrameLayout> - </LinearLayout> - - <TextView - android:id="@+id/audio_player_current_time" - android:layout_width="@dimen/audio_player_time_width" - android:layout_height="wrap_content" - android:layout_alignBottom="@android:id/progress" - android:layout_alignTop="@android:id/progress" - android:layout_toRightOf="@+id/audio_player_large_album_frame" - android:gravity="center" - android:textSize="@dimen/text_size_micro" /> - - <TextView - android:id="@+id/audio_player_total_time" - android:layout_width="@dimen/audio_player_time_width" - android:layout_height="wrap_content" - android:layout_alignBottom="@android:id/progress" - android:layout_alignParentRight="true" - android:layout_alignTop="@android:id/progress" - android:gravity="center" - android:textSize="@dimen/text_size_micro" /> - - <SeekBar - android:id="@android:id/progress" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_above="@+id/audio_player_controlss" - android:layout_marginBottom="@dimen/audio_player_seek_bar_margin_bottom" - android:layout_toLeftOf="@+id/audio_player_total_time" - android:layout_toRightOf="@+id/audio_player_current_time" - android:background="@null" - android:max="1000" - android:thumb="@null" /> - - <LinearLayout - android:id="@+id/audio_player_controlss" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" - android:layout_toRightOf="@+id/audio_player_large_album_frame" - android:baselineAligned="false" > - - <include layout="@layout/audio_player_controls" /> - </LinearLayout> - </RelativeLayout> - - <include layout="@layout/colorstrip" /> - -</FrameLayout>
\ No newline at end of file diff --git a/src/com/cyngn/eleven/ui/activities/HomeActivity.java b/src/com/cyngn/eleven/ui/activities/HomeActivity.java index d30c9a5..cf11bc4 100644 --- a/src/com/cyngn/eleven/ui/activities/HomeActivity.java +++ b/src/com/cyngn/eleven/ui/activities/HomeActivity.java @@ -61,8 +61,10 @@ public class HomeActivity extends BaseActivity { protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); - getSupportFragmentManager().beginTransaction() - .replace(R.id.activity_base_content, new MusicBrowserPhoneFragment()).commit(); + if (savedInstanceState == null) { + getSupportFragmentManager().beginTransaction() + .replace(R.id.activity_base_content, new MusicBrowserPhoneFragment()).commit(); + } // set the action bar background color to be the background theme color mActionBarColor = getResources().getColor(R.color.header_action_bar_color); diff --git a/src/com/cyngn/eleven/ui/fragments/AudioPlayerFragment.java b/src/com/cyngn/eleven/ui/fragments/AudioPlayerFragment.java index b3c3b97..ef5925a 100644 --- a/src/com/cyngn/eleven/ui/fragments/AudioPlayerFragment.java +++ b/src/com/cyngn/eleven/ui/fragments/AudioPlayerFragment.java @@ -86,9 +86,6 @@ public class AudioPlayerFragment extends Fragment implements ServiceConnection, // Album art private ImageView mAlbumArt; - // Tiny artwork - private ImageView mAlbumArtSmall; - // Current time private TextView mCurrentTime; @@ -311,8 +308,6 @@ public class AudioPlayerFragment extends Fragment implements ServiceConnection, mArtistName = (TextView)mRootView.findViewById(R.id.audio_player_artist_name); // Album art mAlbumArt = (ImageView)mRootView.findViewById(R.id.audio_player_album_art); - // Small album art - mAlbumArtSmall = (ImageView)mRootView.findViewById(R.id.audio_player_switch_album_art); // Current time mCurrentTime = (TextView)mRootView.findViewById(R.id.audio_player_current_time); // Total time @@ -340,8 +335,6 @@ public class AudioPlayerFragment extends Fragment implements ServiceConnection, mTotalTime.setText(MusicUtils.makeTimeString(getActivity(), MusicUtils.duration() / 1000)); // Set the album art mImageFetcher.loadCurrentArtwork(mAlbumArt); - // Set the small artwork - mImageFetcher.loadCurrentArtwork(mAlbumArtSmall); // Update the current time queueNextRefresh(1); |