mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
Remaking preferences with fragment activity, no toolbar
This commit is contained in:
@@ -8,6 +8,7 @@ using Android.Views;
|
||||
using Android.Support.V4.View;
|
||||
using Android.Runtime;
|
||||
using Android.Widget;
|
||||
using Android.Content;
|
||||
|
||||
namespace MusicApp
|
||||
{
|
||||
@@ -50,28 +51,37 @@ namespace MusicApp
|
||||
{
|
||||
if(item.ItemId == Android.Resource.Id.Home)
|
||||
{
|
||||
var item2 = menu.FindItem(Resource.Id.search);
|
||||
item2.SetVisible(false);
|
||||
if (PlaylistTracks.instance != null)
|
||||
{
|
||||
var item2 = menu.FindItem(Resource.Id.search);
|
||||
item2.SetVisible(false);
|
||||
if (PlaylistTracks.instance.isEmpty)
|
||||
{
|
||||
ViewGroup rootView = FindViewById<ViewGroup>(Android.Resource.Id.Content);
|
||||
rootView.RemoveView(PlaylistTracks.instance.emptyView);
|
||||
}
|
||||
SupportActionBar.SetHomeButtonEnabled(false);
|
||||
SupportActionBar.SetDisplayHomeAsUpEnabled(false);
|
||||
SupportActionBar.Title = "MusicApp";
|
||||
Navigate(Resource.Id.playlistLayout);
|
||||
}
|
||||
SupportActionBar.SetHomeButtonEnabled(false);
|
||||
SupportActionBar.SetDisplayHomeAsUpEnabled(false);
|
||||
SupportActionBar.Title = "MusicApp";
|
||||
Navigate(Resource.Id.playlistLayout);
|
||||
}
|
||||
else if(item.ItemId == Resource.Id.settings)
|
||||
{
|
||||
HideTabs();
|
||||
Android.Support.V4.App.Fragment fragment = Preferences.NewInstance();
|
||||
SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, fragment).Commit();
|
||||
}
|
||||
//HideTabs();
|
||||
//SupportActionBar.SetDisplayHomeAsUpEnabled(true);
|
||||
//FindViewById<BottomNavigationView>(Resource.Id.bottomView).Visibility = ViewStates.Gone;
|
||||
//SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, fragment).AddToBackStack(null).Commit();
|
||||
|
||||
//FragmentTransaction transaction = FragmentManager.BeginTransaction();
|
||||
//transaction.Replace(Resource.Id.contentView, fragment);
|
||||
//transaction.AddToBackStack(null);
|
||||
//transaction.Commit();
|
||||
|
||||
Intent intent = new Intent(Android.App.Application.Context, typeof(Preferences));
|
||||
StartActivity(intent);
|
||||
//startActivity(mainIntent);
|
||||
}
|
||||
return base.OnOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@@ -178,7 +188,7 @@ namespace MusicApp
|
||||
|
||||
adapter.AddFragment(Browse.NewInstance(), "Songs");
|
||||
adapter.AddFragment(DownloadFragment.NewInstance(), "Artists");
|
||||
adapter.AddFragment(DownloadFragment.NewInstance(), "Folders");
|
||||
adapter.AddFragment(FolderBrowse.NewInstance(), "Folders");
|
||||
|
||||
pager.Adapter = adapter;
|
||||
tabs.SetupWithViewPager(pager);
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
<Compile Include="Resources\Portable Class\PlaylistTracks.cs" />
|
||||
<Compile Include="Resources\Portable Class\Preferences.cs" />
|
||||
<Compile Include="Resources\Portable Class\Queue.cs" />
|
||||
<Compile Include="Resources\Portable Class\TwoLineAdapter.cs" />
|
||||
<Compile Include="Resources\Portable Class\YTitemToSong.cs" />
|
||||
<Compile Include="Resources\Resource.Designer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -160,6 +161,7 @@
|
||||
<Compile Include="Resources\values\FolderHolder.cs" />
|
||||
<Compile Include="Resources\values\Holder.cs" />
|
||||
<Compile Include="Resources\values\Song.cs" />
|
||||
<Compile Include="Resources\values\TwoLineHolder.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
@@ -318,6 +320,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\layout\TwoLineLayout.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
View view = base.OnCreateView(inflater, container, savedInstanceState);
|
||||
this.view = view;
|
||||
view.SetPadding(0, 0, 0, 100);
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -150,8 +151,6 @@ namespace MusicApp.Resources.Portable_Class
|
||||
ListView.ItemClick += ListView_ItemClick;
|
||||
ListView.ItemLongClick += ListView_ItemLongClick;
|
||||
|
||||
//view.SetPadding(0, 55, 0, 0);
|
||||
|
||||
if (adapter == null || adapter.Count == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
convertView.FindViewById<RelativeLayout>(Resource.Id.folderList).SetPadding(folders[position].Padding, 0, 0, 0);
|
||||
|
||||
holder.used.SetTag(Resource.Id.folderUsed, folders[position].uri);
|
||||
holder.used.Click += Preferences.instance.Used_Click;
|
||||
holder.used.Click += PreferencesFragment.instance.Used_Click;
|
||||
|
||||
holder.used.Checked = position == selectedPosition;
|
||||
holder.used.SetTag(Resource.Id.folderName, position);
|
||||
|
||||
@@ -19,12 +19,13 @@ namespace MusicApp.Resources.Portable_Class
|
||||
public static FolderBrowse instance;
|
||||
public static Context act;
|
||||
public static LayoutInflater inflater;
|
||||
public List<Song> musicList = new List<Song>();
|
||||
public Adapter adapter;
|
||||
public List<string> paths = new List<string>();
|
||||
public List<int> pathUse = new List<int>();
|
||||
public ArrayAdapter adapter;
|
||||
public View emptyView;
|
||||
|
||||
private View view;
|
||||
private string[] actions = new string[] { "Play", "Play Next", "Play Last", "Add To Playlist" };
|
||||
private string[] actions = new string[] { "Add To Playlist" };
|
||||
private bool isEmpty = false;
|
||||
|
||||
|
||||
@@ -37,12 +38,10 @@ namespace MusicApp.Resources.Portable_Class
|
||||
ListView.EmptyView = emptyView;
|
||||
|
||||
GetStoragePermission();
|
||||
InitialiseSearchService();
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
MainActivity.instance.RemoveSearchService(0);
|
||||
if (isEmpty)
|
||||
{
|
||||
ViewGroup rootView = Activity.FindViewById<ViewGroup>(Android.Resource.Id.Content);
|
||||
@@ -58,6 +57,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
View view = base.OnCreateView(inflater, container, savedInstanceState);
|
||||
this.view = view;
|
||||
view.SetPadding(0, 0, 0, 100);
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -67,12 +67,6 @@ namespace MusicApp.Resources.Portable_Class
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void InitialiseSearchService()
|
||||
{
|
||||
HasOptionsMenu = true;
|
||||
MainActivity.instance.CreateSearch(0);
|
||||
}
|
||||
|
||||
void GetStoragePermission()
|
||||
{
|
||||
const string permission = Manifest.Permission.ReadExternalStorage;
|
||||
@@ -102,7 +96,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
void PopulateList()
|
||||
{
|
||||
Android.Net.Uri musicUri = MediaStore.Audio.Media.ExternalContentUri;
|
||||
Uri musicUri = MediaStore.Audio.Media.ExternalContentUri;
|
||||
|
||||
CursorLoader cursorLoader = new CursorLoader(Android.App.Application.Context, musicUri, null, null, null, null);
|
||||
ICursor musicCursor = (ICursor)cursorLoader.LoadInBackground();
|
||||
@@ -110,41 +104,31 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
if (musicCursor != null && musicCursor.MoveToFirst())
|
||||
{
|
||||
int titleID = musicCursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Title);
|
||||
int artistID = musicCursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Artist);
|
||||
int albumID = musicCursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Album);
|
||||
int thisID = musicCursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Id);
|
||||
int pathID = musicCursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Data);
|
||||
do
|
||||
{
|
||||
string Artist = musicCursor.GetString(artistID);
|
||||
string Title = musicCursor.GetString(titleID);
|
||||
string Album = musicCursor.GetString(albumID);
|
||||
long AlbumArt = musicCursor.GetLong(musicCursor.GetColumnIndex(MediaStore.Audio.Albums.InterfaceConsts.AlbumId));
|
||||
long id = musicCursor.GetLong(thisID);
|
||||
string path = musicCursor.GetString(pathID);
|
||||
path = path.Substring(0, path.LastIndexOf("/"));
|
||||
|
||||
if (Title == null)
|
||||
Title = "Unknown Title";
|
||||
if (Artist == null)
|
||||
Artist = "Unknow Artist";
|
||||
if (Album == null)
|
||||
Album = "Unknow Album";
|
||||
|
||||
musicList.Add(new Song(Title, Artist, Album, AlbumArt, id, path));
|
||||
if (!paths.Contains(path))
|
||||
{
|
||||
paths.Add(path);
|
||||
pathUse.Add(1);
|
||||
}
|
||||
else
|
||||
pathUse[paths.IndexOf(path)] += 1;
|
||||
}
|
||||
while (musicCursor.MoveToNext());
|
||||
musicCursor.Close();
|
||||
}
|
||||
|
||||
adapter = new Adapter(Android.App.Application.Context, Resource.Layout.SongList, musicList);
|
||||
adapter = new TwoLineAdapter(Android.App.Application.Context, Resource.Layout.TwoLineLayout, paths, pathUse);
|
||||
ListAdapter = adapter;
|
||||
ListView.TextFilterEnabled = true;
|
||||
ListView.ItemClick += ListView_ItemClick;
|
||||
ListView.ItemLongClick += ListView_ItemLongClick;
|
||||
|
||||
//view.SetPadding(0, 55, 0, 0);
|
||||
|
||||
if (adapter == null || adapter.Count == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
@@ -152,21 +136,26 @@ namespace MusicApp.Resources.Portable_Class
|
||||
}
|
||||
}
|
||||
|
||||
public void Search(string search)
|
||||
{
|
||||
List<Song> result = new List<Song>();
|
||||
foreach (Song item in musicList)
|
||||
{
|
||||
if (item.GetName().ToLower().Contains(search.ToLower()) || item.GetArtist().ToLower().Contains(search.ToLower()))
|
||||
{
|
||||
result.Add(item);
|
||||
}
|
||||
}
|
||||
ListAdapter = new Adapter(Android.App.Application.Context, Resource.Layout.SongList, result);
|
||||
}
|
||||
|
||||
public void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
|
||||
{
|
||||
Song item = musicList[e.Position];
|
||||
Play(item);
|
||||
}
|
||||
ListSongs(paths[e.Position]);
|
||||
}
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ListSongs(string paths)
|
||||
{
|
||||
//AppCompatActivity act = (AppCompatActivity)Activity;
|
||||
//act.SupportActionBar.SetHomeButtonEnabled(true);
|
||||
//act.SupportActionBar.SetDisplayHomeAsUpEnabled(true);
|
||||
//act.SupportActionBar.Title = playList[e.Position];
|
||||
//FragmentTransaction transaction = FragmentManager.BeginTransaction();
|
||||
//transaction.Replace(Resource.Id.contentView, PlaylistTracks.NewInstance(playlistId[e.Position]));
|
||||
//transaction.AddToBackStack(null);
|
||||
//transaction.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
public View emptyView;
|
||||
|
||||
private List<string> playList = new List<string>();
|
||||
private List<int> playListCount = new List<int>();
|
||||
private List<long> playlistId = new List<long>();
|
||||
private string[] actions = new string[] { "Random play", "Rename", "Delete" };
|
||||
private bool isEmpty = false;
|
||||
@@ -49,7 +50,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
View view = base.OnCreateView(inflater, container, savedInstanceState);
|
||||
//view.SetPadding(0, 150, 0, 0);
|
||||
view.SetPadding(0, 100, 0, 0);
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -100,17 +101,22 @@ namespace MusicApp.Resources.Portable_Class
|
||||
if (cursor != null && cursor.MoveToFirst())
|
||||
{
|
||||
int nameID = cursor.GetColumnIndex(MediaStore.Audio.Playlists.InterfaceConsts.Name);
|
||||
//int countID = cursor.GetColumnIndex(MediaStore.Audio.Playlists.InterfaceConsts.Count);
|
||||
int listID = cursor.GetColumnIndex(MediaStore.Audio.Playlists.InterfaceConsts.Id);
|
||||
do
|
||||
{
|
||||
string name = cursor.GetString(nameID);
|
||||
//int count = cursor.GetInt(countID);
|
||||
long id = cursor.GetLong(listID);
|
||||
playList.Add(name);
|
||||
//playListCount.Add(count);
|
||||
playlistId.Add(id);
|
||||
|
||||
}
|
||||
while (cursor.MoveToNext());
|
||||
cursor.Close();
|
||||
}
|
||||
//ListAdapter = new TwoLineAdapter(Android.App.Application.Context, Resource.Layout.TwoLineLayout, playList, playListCount);
|
||||
ListAdapter = new ArrayAdapter(Android.App.Application.Context, Resource.Layout.PlaylistList, playList);
|
||||
ListView.TextFilterEnabled = true;
|
||||
ListView.ItemClick += ListView_ItemClick;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Android.Support.V4.App;
|
||||
using Android.Support.V7.Preferences;
|
||||
using Android.Preferences;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Views;
|
||||
using Android.OS;
|
||||
@@ -9,20 +8,35 @@ using MusicApp.Resources.values;
|
||||
using Java.IO;
|
||||
using Android.Widget;
|
||||
using Android.Content;
|
||||
using Android.App;
|
||||
|
||||
using AlertDialog = Android.Support.V7.App.AlertDialog;
|
||||
|
||||
namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
public class Preferences : PreferenceFragmentCompat
|
||||
[Activity(Label = "Settings", Theme = "@style/Theme")]
|
||||
public class Preferences : PreferenceActivity
|
||||
{
|
||||
public static Preferences instance;
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
FragmentManager.BeginTransaction().Replace(Android.Resource.Id.Content, new PreferencesFragment()).Commit();
|
||||
}
|
||||
}
|
||||
|
||||
public class PreferencesFragment : PreferenceFragment
|
||||
{
|
||||
public static PreferencesFragment instance;
|
||||
private List<Folder> folders;
|
||||
private FolderAdapter adapter;
|
||||
private ListView folderList;
|
||||
private string path;
|
||||
private AlertDialog dialog;
|
||||
|
||||
public override void OnCreatePreferences(Bundle savedInstanceState, string rootKey)
|
||||
public override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
instance = this;
|
||||
AddPreferencesFromResource(Resource.Layout.Preferences);
|
||||
Preference pref = PreferenceScreen.FindPreference("downloadPath");
|
||||
pref.PreferenceClick += Pref_PreferenceClick;
|
||||
@@ -37,19 +51,6 @@ namespace MusicApp.Resources.Portable_Class
|
||||
instance = null;
|
||||
}
|
||||
|
||||
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
View view = base.OnCreateView(inflater, container, savedInstanceState);
|
||||
//view.SetPadding(0, 150, 0, 0);
|
||||
return view;
|
||||
}
|
||||
|
||||
public static Fragment NewInstance()
|
||||
{
|
||||
instance = new Preferences { Arguments = new Bundle() };
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void Pref_PreferenceClick(object sender, Preference.PreferenceClickEventArgs e)
|
||||
{
|
||||
folders = ListFolders();
|
||||
@@ -146,7 +147,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
editor.PutString("downloadPath", path);
|
||||
editor.Apply();
|
||||
|
||||
Preference prefButton = PreferenceScreen.FindPreference("downloadPath");
|
||||
Preference prefButton = FindPreference("downloadPath");
|
||||
prefButton.Summary = path;
|
||||
}
|
||||
|
||||
|
||||
52
MusicApp/Resources/Portable Class/TwoLineAdapter.cs
Normal file
52
MusicApp/Resources/Portable Class/TwoLineAdapter.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Android.Content;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using MusicApp.Resources.values;
|
||||
using Android.Graphics;
|
||||
using Android.Util;
|
||||
using System.IO;
|
||||
using Android.OS;
|
||||
using Android.App;
|
||||
using Square.Picasso;
|
||||
|
||||
namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
public class TwoLineAdapter : ArrayAdapter
|
||||
{
|
||||
private Context context;
|
||||
private List<string> line1;
|
||||
private List<int> line2;
|
||||
private LayoutInflater inflater;
|
||||
private int resource;
|
||||
|
||||
public TwoLineAdapter(Context context, int resource, List<string> line1, List<int> line2) : base(context, resource, line1)
|
||||
{
|
||||
this.context = context;
|
||||
this.resource = resource;
|
||||
this.line1 = line1;
|
||||
this.line2 = line2;
|
||||
}
|
||||
|
||||
public override View GetView(int position, View convertView, ViewGroup parent)
|
||||
{
|
||||
if (inflater == null)
|
||||
{
|
||||
inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
|
||||
}
|
||||
if (convertView == null)
|
||||
{
|
||||
convertView = inflater.Inflate(resource, parent, false);
|
||||
}
|
||||
TwoLineHolder holder = new TwoLineHolder(convertView)
|
||||
{
|
||||
Line1 = { Text = line1[position] },
|
||||
Line2 = { Text = line2[position].ToString() + ((line2[position] > 1) ? " elements" : " element") },
|
||||
};
|
||||
|
||||
convertView.SetBackgroundColor(Color.White);
|
||||
return convertView;
|
||||
}
|
||||
}
|
||||
}
|
||||
34
MusicApp/Resources/Resource.Designer.cs
generated
34
MusicApp/Resources/Resource.Designer.cs
generated
@@ -2477,8 +2477,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f07008c
|
||||
public const int bottomView = 2131165324;
|
||||
|
||||
// aapt resource value: 0x7f0700bc
|
||||
public const int browseLayout = 2131165372;
|
||||
// aapt resource value: 0x7f0700bd
|
||||
public const int browseLayout = 2131165373;
|
||||
|
||||
// aapt resource value: 0x7f070073
|
||||
public const int browseList = 2131165299;
|
||||
@@ -2567,8 +2567,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f070012
|
||||
public const int disableHome = 2131165202;
|
||||
|
||||
// aapt resource value: 0x7f0700bd
|
||||
public const int downloadLayout = 2131165373;
|
||||
// aapt resource value: 0x7f0700be
|
||||
public const int downloadLayout = 2131165374;
|
||||
|
||||
// aapt resource value: 0x7f070066
|
||||
public const int edit_query = 2131165286;
|
||||
@@ -2657,6 +2657,9 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0700a0
|
||||
public const int line1 = 2131165344;
|
||||
|
||||
// aapt resource value: 0x7f0700b9
|
||||
public const int line2 = 2131165369;
|
||||
|
||||
// aapt resource value: 0x7f0700a2
|
||||
public const int line3 = 2131165346;
|
||||
|
||||
@@ -2669,8 +2672,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f070048
|
||||
public const int list_item = 2131165256;
|
||||
|
||||
// aapt resource value: 0x7f0700ba
|
||||
public const int masked = 2131165370;
|
||||
// aapt resource value: 0x7f0700bb
|
||||
public const int masked = 2131165371;
|
||||
|
||||
// aapt resource value: 0x7f070094
|
||||
public const int media_actions = 2131165332;
|
||||
@@ -2684,8 +2687,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f070019
|
||||
public const int multiply = 2131165209;
|
||||
|
||||
// aapt resource value: 0x7f0700bb
|
||||
public const int musicLayout = 2131165371;
|
||||
// aapt resource value: 0x7f0700bc
|
||||
public const int musicLayout = 2131165372;
|
||||
|
||||
// aapt resource value: 0x7f07007d
|
||||
public const int navigation_header_container = 2131165309;
|
||||
@@ -2741,8 +2744,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0700a8
|
||||
public const int playerTitle = 2131165352;
|
||||
|
||||
// aapt resource value: 0x7f0700be
|
||||
public const int playlistLayout = 2131165374;
|
||||
// aapt resource value: 0x7f0700bf
|
||||
public const int playlistLayout = 2131165375;
|
||||
|
||||
// aapt resource value: 0x7f070074
|
||||
public const int playlistName = 2131165300;
|
||||
@@ -2825,8 +2828,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f070072
|
||||
public const int select_dialog_listview = 2131165298;
|
||||
|
||||
// aapt resource value: 0x7f0700bf
|
||||
public const int settings = 2131165375;
|
||||
// aapt resource value: 0x7f0700c0
|
||||
public const int settings = 2131165376;
|
||||
|
||||
// aapt resource value: 0x7f07005c
|
||||
public const int shortcut = 2131165276;
|
||||
@@ -2954,8 +2957,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f07000e
|
||||
public const int view_offset_helper = 2131165198;
|
||||
|
||||
// aapt resource value: 0x7f0700b9
|
||||
public const int visible = 2131165369;
|
||||
// aapt resource value: 0x7f0700ba
|
||||
public const int visible = 2131165370;
|
||||
|
||||
// aapt resource value: 0x7f070027
|
||||
public const int withText = 2131165223;
|
||||
@@ -3280,6 +3283,9 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f030057
|
||||
public const int TimerLayout = 2130903127;
|
||||
|
||||
// aapt resource value: 0x7f030058
|
||||
public const int TwoLineLayout = 2130903128;
|
||||
|
||||
static Layout()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
<android.support.design.widget.TabLayout
|
||||
@@ -30,17 +29,14 @@
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
<FrameLayout
|
||||
android:id="@+id/contentView"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent" />
|
||||
android:layout_height="wrap_content" />
|
||||
<RelativeLayout
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:layout_height="wrap_content">
|
||||
<FrameLayout
|
||||
android:id="@+id/contentView"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/bottomView"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<android.support.v7.preference.PreferenceCategory android:title="Download">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<PreferenceCategory android:title="Download">
|
||||
<Preference
|
||||
android:key="downloadPath"
|
||||
android:title="Download directory"
|
||||
android:summary="test"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
</android.support.v7.preference.PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
21
MusicApp/Resources/layout/TwoLineLayout.xml
Normal file
21
MusicApp/Resources/layout/TwoLineLayout.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
<TextView
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="16dip"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#000" />
|
||||
</LinearLayout>
|
||||
18
MusicApp/Resources/values/TwoLineHolder.cs
Normal file
18
MusicApp/Resources/values/TwoLineHolder.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
|
||||
namespace MusicApp.Resources.values
|
||||
{
|
||||
[System.Serializable]
|
||||
public class TwoLineHolder
|
||||
{
|
||||
public TextView Line1;
|
||||
public TextView Line2;
|
||||
|
||||
public TwoLineHolder(View v)
|
||||
{
|
||||
Line1 = v.FindViewById<TextView>(Resource.Id.line1);
|
||||
Line2 = v.FindViewById<TextView>(Resource.Id.line2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user