Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Fixed bugs when the cloud isn't available for resuming playb…
…ack. Fixed layout for StartResumePlayback.
- Loading branch information
1 parent
19107c0
commit ec027ba
Showing
10 changed files
with
717 additions
and
555 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
89 changes: 89 additions & 0 deletions
89
MPfm/MPfm.Android/Classes/Fragments/CloudConnectFragment.cs
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,89 @@ | ||
// Copyright © 2011-2013 Yanick Castonguay | ||
// | ||
// This file is part of MPfm. | ||
// | ||
// MPfm 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. | ||
// | ||
// MPfm 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 MPfm. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
using System; | ||
using Android.App; | ||
using Android.Content; | ||
using Android.OS; | ||
using Android.Views; | ||
using MPfm.Android.Classes.Fragments.Base; | ||
using MPfm.MVP.Models; | ||
using MPfm.MVP.Views; | ||
|
||
namespace MPfm.Android.Classes.Fragments | ||
{ | ||
public class CloudConnectFragment : BaseDialogFragment, ICloudConnectView, View.IOnClickListener | ||
{ | ||
private View _view; | ||
|
||
// Leave an empty constructor or the application will crash at runtime | ||
public CloudConnectFragment() : base() { } | ||
|
||
//public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | ||
//{ | ||
// _view = inflater.Inflate(Resource.Layout.SyncManualConnect, container, false); | ||
// return _view; | ||
//} | ||
|
||
public override Dialog OnCreateDialog(Bundle savedInstanceState) | ||
{ | ||
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(Activity, Resource.Style.DialogTheme)); | ||
LayoutInflater inflater = Activity.LayoutInflater; | ||
builder.SetView(inflater.Inflate(Resource.Layout.CloudConnect, null)); | ||
builder.SetTitle("Connect to Dropbox"); | ||
builder.SetPositiveButton("Connect", PositiveButtonHandler); | ||
builder.SetNegativeButton("Cancel", NegativeButtonHandler); | ||
return builder.Create(); | ||
} | ||
|
||
public override void OnCreate(Bundle savedInstanceState) | ||
{ | ||
base.OnCreate(savedInstanceState); | ||
//SetStyle((int)DialogFragmentStyle.Normal, (int)Resource.Style.DialogTheme); | ||
} | ||
|
||
private void NegativeButtonHandler(object sender, DialogClickEventArgs dialogClickEventArgs) | ||
{ | ||
|
||
} | ||
|
||
private void PositiveButtonHandler(object sender, DialogClickEventArgs dialogClickEventArgs) | ||
{ | ||
|
||
} | ||
|
||
public void OnClick(View v) | ||
{ | ||
|
||
} | ||
|
||
#region ICloudConnectView implementation | ||
|
||
public Action OnCheckIfAccountIsLinked { get; set; } | ||
|
||
public void CloudConnectError(Exception ex) | ||
{ | ||
} | ||
|
||
public void RefreshStatus(CloudConnectEntity entity) | ||
{ | ||
} | ||
|
||
#endregion | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="200dp" | ||
android:layout_height="56dp" | ||
android:orientation="vertical"> | ||
<TextView | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:padding="12dp" | ||
android:text="Connecting to Dropbox..." | ||
android:textColor="#AAAAAA" | ||
android:textSize="14dp" /> | ||
<Button | ||
android:id="@+id/cloudConnect_btnCancel" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:drawableLeft="@drawable/selectimage" | ||
android:drawablePadding="2dp" | ||
android:background="@drawable/dialogbutton" | ||
android:text="Resume from this device" | ||
android:textColor="@color/dialogbutton_text" | ||
android:textSize="14dp" | ||
android:padding="6dp" /> | ||
</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
Oops, something went wrong.