Navigation Menu

Skip to content

Commit

Permalink
Android: Added layout for EqualizerPresetDetails. Missing dynamic vie…
Browse files Browse the repository at this point in the history
…ws in scrollview (i.e. equalizer bands). Added empty EqualizerPresetGraphView control.

Related to issue #406.
  • Loading branch information
ycastonguay committed Jul 3, 2013
1 parent adcd6ad commit e4d9734
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 205 deletions.
65 changes: 65 additions & 0 deletions MPfm/MPfm.Android/Classes/Controls/EqualizerPresetGraphView.cs
@@ -0,0 +1,65 @@
// 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Android.Views;
using Android.Widget;

namespace org.sessionsapp.android
{
public class EqualizerPresetGraphView : View
{
public EqualizerPresetGraphView(Context context) : base(context)
{
Initialize();
}

public EqualizerPresetGraphView(Context context, IAttributeSet attrs) : base (context, attrs)
{
Initialize();
}

public EqualizerPresetGraphView(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
{
Initialize();
}

public EqualizerPresetGraphView(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
Initialize();
}

private void Initialize()
{
}

public override void Draw(global::Android.Graphics.Canvas canvas)
{
Console.WriteLine("EqualizerPresetGraphView - Draw");
base.Draw(canvas);
}
}
}
1 change: 1 addition & 0 deletions MPfm/MPfm.Android/MPfm.Android.csproj
Expand Up @@ -69,6 +69,7 @@
<Compile Include="Classes\Adapters\TabPagerAdapter.cs" />
<Compile Include="Classes\Adapters\MobileLibraryBrowserListAdapter.cs" />
<Compile Include="Classes\Application.cs" />
<Compile Include="Classes\Controls\EqualizerPresetGraphView.cs" />
<Compile Include="Classes\Controls\OutputMeterView.cs" />
<Compile Include="Classes\Controls\WaveFormView.cs" />
<Compile Include="Classes\Fragments\Base\BaseFragment.cs" />
Expand Down
54 changes: 47 additions & 7 deletions MPfm/MPfm.Android/Resources/Layout/EqualizerPresetDetails.axml
Expand Up @@ -4,11 +4,51 @@
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/equalizerPresetDetails_lblTitle"
android:text="[Title]"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="6dip" />
<org.sessionsapp.android.EqualizerPresetGraphView
android:id="@+id/equalizerPresetDetails_graphView"
android:orientation="horizontal"
android:background="#000000"
android:layout_width="fill_parent"
android:layout_height="140dp">
</org.sessionsapp.android.EqualizerPresetGraphView>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:id="@+id/equalizerPresetDetails_lblPresetName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Preset Name:"
android:textSize="14dp"
android:padding="8dp" />
<EditText
android:id="@+id/equalizerPresetDetails_txtPresetName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="14dp"
android:padding="8dp" />
</LinearLayout>
<ScrollView
android:id="@+id/equalizerPresetDetails_scrollView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- Scroll view can only have one child -->
<LinearLayout
android:id="@+id/equalizerPresetDetails_scrollViewLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="8dp">
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>

0 comments on commit e4d9734

Please sign in to comment.