Commit 97b9b53f authored by jade.woodward's avatar jade.woodward

redoing because conflict

# Conflicts:
#	app/src/main/java/com/example/soulfood_assignment2/SavedPlaylists.java
#	app/src/main/res/layout/activity_saved_playlists.xml
parents b9c50170 06f709c7
<component name="ProjectDictionaryState">
<dictionary name="charleypunshon">
<words>
<w>successully</w>
</words>
</dictionary>
</component>
\ No newline at end of file
This diff is collapsed.
......@@ -11,18 +11,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".SongInformationPage"></activity>
<activity android:name=".SongScreenView" />
<activity android:name=".playlistView" />
<activity android:name=".SavedPlaylists" />
<activity
android:name="com.spotify.sdk.android.authentication.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name=".homeScreen" />
<activity android:name=".settings" />
<activity android:name=".swtViewScreen" />
<activity android:name=".searchScreen" />
<activity android:name=".build_playlist" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -6,6 +6,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.spotify.android.appremote.api.ConnectionParams;
import com.spotify.android.appremote.api.Connector;
......@@ -157,12 +158,14 @@ public class MainActivity extends AppCompatActivity {
SpotifyAppRemote.connect(this, connP, new Connector.ConnectionListener() {
public void onConnected(SpotifyAppRemote spotifyAppRemote) {
spotifyClass.mSpotifyAppRemote = spotifyAppRemote;
Toast.makeText(MainActivity.this,"Connected to Spotify", Toast.LENGTH_LONG).show();
Log.d("Testing!!!", "Connected");
connected();
}
public void onFailure(Throwable throwable) {
Toast.makeText(MainActivity.this,"Not Connected to Spotify", Toast.LENGTH_LONG).show();
Log.e("Testing!!!", throwable.getMessage(), throwable);
//Something went wrong when attempting to connect! Handle errors here
}
......
......@@ -10,7 +10,7 @@ import android.widget.ListView;
import java.util.ArrayList;
public class SavedPlaylists extends AppCompatActivity {
public class SavedPlaylist extends AppCompatActivity {
public static SharedPreferences playlists;
@Override
......
package com.example.soulfood_assignment2;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
public class SongInformationPage extends AppCompatActivity {
String title;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_song_information_page);
title = getIntent().getStringExtra("song_name");
String tag1 = getIntent().getStringExtra("tag1_name");
String tag2 = getIntent().getStringExtra("tag2_name");
String tag3 = getIntent().getStringExtra("tag3_name");
TextView songNameView = findViewById(R.id.songNameView);
TextView tag1View = findViewById(R.id.tag1View);
TextView tag2View = findViewById(R.id.tag2View);
TextView tag3View = findViewById(R.id.tag3View);
songNameView.setText(title);
tag1View.setText(tag1);
tag2View.setText(tag2);
tag3View.setText(tag3);
}
public void songPlayOnClick(View view) {
String id = getIntent().getStringExtra("id");
SpotifyClass spotifyClass = MainActivity.spotifyClass;
spotifyClass.pauseSong();
spotifyClass.playSong(id);
Toast.makeText(SongInformationPage.this,"You are now playing: " + title, Toast.LENGTH_LONG).show();
}
public void songPauseOnClick(View view) {
SpotifyClass spotifyClass = MainActivity.spotifyClass;
spotifyClass.pauseSong();
Toast.makeText(SongInformationPage.this,"You've now paused the song", Toast.LENGTH_LONG).show();
}
}
package com.example.soulfood_assignment2;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class SongScreenView extends AppCompatActivity {
String id = getIntent().getStringExtra("id");
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_song_screen_view);
setContentView(R.layout.activity_song_screen_view2);
String title = getIntent().getStringExtra("song_name");
String tag1 = getIntent().getStringExtra("tag1_name");
String tag2 = getIntent().getStringExtra("tag2_name");
String tag3 = getIntent().getStringExtra("tag3_name");
TextView songNameView = findViewById(R.id.songName);
TextView tag1View = findViewById(R.id.tag1);
TextView tag2View = findViewById(R.id.tag2);
TextView tag3View = findViewById(R.id.tag3);
songNameView.setText(title);
tag1View.setText(tag1);
tag2View.setText(tag2);
tag3View.setText(tag3);
}
String song = getIntent().getStringExtra("song_name");
TextView tagNameView = findViewById(R.id.songName);
tagNameView.setText(song);
public void playPlaylistOnClick(View view) {
//SpotifyClass spotifyClass = MainActivity.spotifyClass;
//spotifyClass.pauseSong();
//spotifyClass.playSong(id);
}
}
......@@ -9,14 +9,31 @@ import android.widget.ArrayAdapter;
import android.widget.ListView;
import java.util.ArrayList;
import java.util.Arrays;
public class ThaiAsyncTask extends AsyncTask<Void, Void, ArrayAdapter<String>> {
public ArrayList<String> thaiResults = new ArrayList<>();
public ArrayList<String> attributesSong1 = new ArrayList<>();
public ArrayList<String> attributesSong2 = new ArrayList<>();
public ArrayList<String> attributesSong3 = new ArrayList<>();
public ArrayList<String> attributesSong4 = new ArrayList<>();
public ArrayList<String> attributesSong5 = new ArrayList<>();
public ArrayList<String> attributesSong6 = new ArrayList<>();
public ArrayList<String> attributesSong7 = new ArrayList<>();
public ArrayList<String> songNamesList = new ArrayList<>();
public String[] songNames = new String[7];
public ListView listView;
public Context context;
public databaseInterface.Cuisine cuisine;
public databaseInterface.Vibe vibe;
public databaseInterface.Time time;
public ThaiAsyncTask(Context context, databaseInterface.Cuisine cuisine, databaseInterface.Time time, databaseInterface.Vibe vibe) {
public ThaiAsyncTask(Context context) {
this.context = context;
this.cuisine = cuisine;
this.vibe = vibe;
this.time = time;
}
......@@ -26,12 +43,22 @@ public class ThaiAsyncTask extends AsyncTask<Void, Void, ArrayAdapter<String>>
try {
databaseInterface dbi = new databaseInterface();
thaiResults = dbi.getPlaylistByAttributes(databaseInterface.Cuisine.thai, databaseInterface.Vibe.any, databaseInterface.Time.any);
for(int i = 0; i < thaiResults.size(); i++) {
Log.d("ThaiResults!!!", thaiResults.get(i));
thaiResults = dbi.getPlaylistByAttributes(cuisine, vibe, time);
for(int i = 0; i < thaiResults.size(); i++) {
songNames[i] = dbi.getSongTitle(thaiResults.get(i));
}
songNamesList = new ArrayList<>(Arrays.asList(songNames));
attributesSong1 = dbi.getAttributesBySongID(thaiResults.get(0));
attributesSong2 = dbi.getAttributesBySongID(thaiResults.get(1));
attributesSong3 = dbi.getAttributesBySongID(thaiResults.get(2));
attributesSong4 = dbi.getAttributesBySongID(thaiResults.get(3));
attributesSong5 = dbi.getAttributesBySongID(thaiResults.get(4));
attributesSong6 = dbi.getAttributesBySongID(thaiResults.get(5));
attributesSong7 = dbi.getAttributesBySongID(thaiResults.get(6));
ArrayAdapter thaiAdapter = new ArrayAdapter<String>(
context, android.R.layout.simple_list_item_1, thaiResults
context, android.R.layout.simple_list_item_1, songNamesList
);
return thaiAdapter;
} catch (Exception e) {
......
......@@ -3,38 +3,121 @@ package com.example.soulfood_assignment2;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import java.lang.reflect.Array;
import java.util.ArrayList;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.american;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.any;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.chinese;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.french;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.indian;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.italian;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.thai;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.calming;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.chill;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.energetic;
public class build_playlist extends AppCompatActivity {
String vibe;
String cuisine;
String timeOfDay;
databaseInterface.Cuisine cuisineTag;
databaseInterface.Vibe vibeTag;
databaseInterface.Time timeTag;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.build_playlist);
String[] vibes = new String[] {"None", "Chilled", "Energetic", "Relaxing"};
ArrayList<String> vibes = new ArrayList<>();
vibes.add("any");
vibes.add("chilled");
vibes.add("energetic");
vibes.add("relaxing");
Spinner vibesSpinner = findViewById(R.id.vibe_dropdown);
ArrayAdapter<String> vibesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, vibes);
vibesSpinner.setAdapter(vibesAdapter);
String[] cuisines = new String[] {"None", "Chinese", "Thai", "Indian", "Italian", "American", "French", "Spanish"};
vibesSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) {
vibe = vibes.get(position);
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
ArrayList<String> cuisines = new ArrayList<>();
cuisines.add("any");
cuisines.add("chinese");
cuisines.add("thai");
cuisines.add("indian");
cuisines.add("italian");
cuisines.add("american");
cuisines.add("french");
cuisines.add("spanish");
Spinner cuisineSpinner = findViewById(R.id.cuisine_dropdown);
ArrayAdapter<String> cuisineAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, cuisines);
cuisineSpinner.setAdapter(cuisineAdapter);
String[] timeOfDay = new String[] {"None", "Breakfast", "Lunch", "Dinner"};
cuisineSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) {
cuisine = cuisines.get(position);
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
ArrayList<String> timeOfDays = new ArrayList<>();
timeOfDays.add("any");
timeOfDays.add("breakfast");
timeOfDays.add("lunch");
timeOfDays.add("dinner");
Spinner timeOfDaySpinner = findViewById(R.id.tod_dropdown);
ArrayAdapter<String> timeOfDayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, timeOfDay);
ArrayAdapter<String> timeOfDayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, timeOfDays);
timeOfDaySpinner.setAdapter(timeOfDayAdapter);
cuisineSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) {
timeOfDay = timeOfDays.get(position);
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
}
public void buildPlaylistOnClick(View view) {
// Intent intent = new Intent(this, PlaylistView.class);
// startActivity(intent);
Intent intent = new Intent(this, playlistView.class);
intent.putExtra("vibe", vibe);
Log.d("VibeBitch!", vibe);
intent.putExtra("cuisine", cuisine);
intent.putExtra("timeofday", timeOfDay);
startActivity(intent);
}
......
package com.example.soulfood_assignment2;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListView;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.american;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.any;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.chinese;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.french;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.indian;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.italian;
import static com.example.soulfood_assignment2.databaseInterface.Cuisine.thai;
import static com.example.soulfood_assignment2.databaseInterface.Time.breakfast;
import static com.example.soulfood_assignment2.databaseInterface.Time.dinner;
import static com.example.soulfood_assignment2.databaseInterface.Time.lunch;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.calming;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.chill;
import static com.example.soulfood_assignment2.databaseInterface.Vibe.energetic;
public class playlistView extends AppCompatActivity {
databaseInterface.Cuisine cuisineTag;
databaseInterface.Vibe vibeTag;
databaseInterface.Time timeTag;
ListView playlistView;
String cuisine;
String vibe;
String timeOfDay;
String anyVibe = "any";
String anyTime = "any";
String anyCuisine = "any";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_playlist_view);
cuisine = getIntent().getStringExtra("cuisine");
vibe = getIntent().getStringExtra("vibe");
timeOfDay = getIntent().getStringExtra("timeofday");
if(cuisine == null) {
cuisineTag = any;
} else if(cuisine.equalsIgnoreCase(anyCuisine)) {
cuisineTag = any;
} else if(cuisine.equalsIgnoreCase("chinese")) {
cuisineTag = chinese;
} else if(cuisine.equalsIgnoreCase("thai")) {
cuisineTag = thai;
} else if(cuisine.equalsIgnoreCase("indian")) {
cuisineTag = indian;
} else if(cuisine.equalsIgnoreCase("italian")) {
cuisineTag = italian;
} else if(cuisine.equalsIgnoreCase("american")) {
cuisineTag = american;
} else if(cuisine.equalsIgnoreCase("french")) {
cuisineTag = french;
}
if(vibe == null) {
vibeTag = databaseInterface.Vibe.any;
} else if(vibe.equalsIgnoreCase(anyVibe)) {
vibeTag = databaseInterface.Vibe.any;
} else if(vibe.equalsIgnoreCase("chilled")) {
vibeTag = chill;
} else if(vibe.equalsIgnoreCase("energetic")) {
vibeTag = energetic;
} else if(vibe.equalsIgnoreCase("relaxed")) {
vibeTag = calming;
}
if(timeOfDay == null) {
timeTag = databaseInterface.Time.any;
} else if(timeOfDay.equalsIgnoreCase(anyTime)) {
timeTag = databaseInterface.Time.any;
} else if(timeOfDay.equalsIgnoreCase("breakfast")) {
timeTag = breakfast;
} else if(timeOfDay.equalsIgnoreCase("lunch")) {
timeTag = lunch;
} else if(timeOfDay.equalsIgnoreCase("dinner")) {
timeTag = dinner;
}
ThaiAsyncTask thaiAsyncTask = new ThaiAsyncTask(this, cuisineTag, timeTag, vibeTag);
thaiAsyncTask.listView = findViewById(R.id.playlistView);
thaiAsyncTask.execute();
playlistView = thaiAsyncTask.listView;
}
}
......@@ -11,6 +11,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SearchView;
import android.widget.Toast;
import java.util.AbstractList;
import java.util.ArrayList;
......@@ -65,9 +66,6 @@ public class searchScreen extends AppCompatActivity {
tagNamePage("Chinese", chineseResults);
break;
case 1:
ThaiAsyncTask thaiAsyncTask = new ThaiAsyncTask(searchScreen.this);
thaiAsyncTask.listView = songResults;
thaiAsyncTask.execute();
tagNamePage("Thai", thaiResults);
break;
case 2:
......@@ -150,6 +148,8 @@ public class searchScreen extends AppCompatActivity {
sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
Toast.makeText(searchScreen.this,"No tags to match this result.", Toast.LENGTH_LONG).show();
return false;
}
......
......@@ -12,6 +12,7 @@ import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.Toast;
import static android.R.layout.simple_spinner_dropdown_item;
......@@ -28,10 +29,6 @@ public class settings extends AppCompatActivity {
setContentView(R.layout.activity_settings);
initControls();
Integer[] textSize = new Integer[] {18, 20, 24}; // get off Jade
Spinner eqSpinner = findViewById(R.id.eq_dropdown);
ArrayAdapter<Integer> spinnerAdapter = new ArrayAdapter<>(this, simple_spinner_dropdown_item, textSize);
eqSpinner.setAdapter(spinnerAdapter);
final MediaPlayer mp = MediaPlayer.create(this, R.raw.beepsoundeffect);
Button revertToFactorySettings = findViewById(R.id.factorySettings);
......@@ -67,7 +64,7 @@ public class settings extends AppCompatActivity {
public void onProgressChanged(SeekBar arg0, int progress, boolean arg2) {
am.setStreamVolume(AudioManager.STREAM_MUSIC,
progress, AudioManager.FLAG_PLAY_SOUND);
System.out.print(progress);
Toast.makeText(settings.this,"Volume successully changed - Click test to test volume", Toast.LENGTH_SHORT).show();
}
});
} catch (Exception e) {
......
......@@ -106,7 +106,7 @@ public class swtViewScreen extends AppCompatActivity {
);
tagResults = findViewById(R.id.charleyNeedsHelp);
//tagResults = findViewById(R.id.charleyNeedsHelp);
if (tagNameView.getText().toString().equals("Songs with 'Chinese' Tag")) {
......@@ -117,56 +117,61 @@ public class swtViewScreen extends AppCompatActivity {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:
songPage(chineseResults.get(0));
//songPage(chineseResults.get(0));
break;
case 1:
songPage(chineseResults.get(1));
//songPage(chineseResults.get(1));
break;
case 2:
songPage(chineseResults.get(2));
//songPage(chineseResults.get(2));
break;
case 3:
songPage(chineseResults.get(3));
//songPage(chineseResults.get(3));
break;
case 4:
songPage(chineseResults.get(4));
//songPage(chineseResults.get(4));
break;
case 5:
songPage(chineseResults.get(5));
//songPage(chineseResults.get(5));
break;
case 6:
songPage(chineseResults.get(6));
//songPage(chineseResults.get(6));
break;
}
}
});
} else if(tagNameView.getText().toString().equals("Songs with 'Thai' Tag")) {
ThaiAsyncTask thaiAsyncTask = new ThaiAsyncTask(swtViewScreen.this, databaseInterface.Cuisine.thai, databaseInterface.Time.any, databaseInterface.Vibe.any);
thaiAsyncTask.listView = findViewById(R.id.charleyNeedsHelp);
thaiAsyncTask.execute();
tagResults = thaiAsyncTask.listView;
tagResults.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:
SpotifyClass spotifyClass = MainActivity.spotifyClass;
spotifyClass.pauseSong();
spotifyClass.playSong("0RvQJoaiQC3sYafoDTdiEJ");
songPage(thaiAsyncTask.songNames[0], thaiAsyncTask.attributesSong1.get(0), thaiAsyncTask.attributesSong1.get(1), thaiAsyncTask.attributesSong1.get(2));
break;
case 1:
songPage(thaiResults.get(1));
//songPage(thaiResults.get(1));
break;
case 2:
songPage(thaiResults.get(2));
//songPage(thaiResults.get(2));
break;
case 3:
songPage(chineseResults.get(3));
//songPage(chineseResults.get(3));
break;
case 4:
songPage(chineseResults.get(4));
//songPage(chineseResults.get(4));
break;
case 5:
songPage(chineseResults.get(5));
//songPage(chineseResults.get(5));
break;
case 6:
songPage(chineseResults.get(6));
//songPage(chineseResults.get(6));
break;
}
}
......@@ -453,9 +458,12 @@ public class swtViewScreen extends AppCompatActivity {
}
public void songPage(String songName) {
songView = new Intent(this, SongScreenView.class);
public void songPage(String songName, String tag1, String tag2, String tag3) {
songView = new Intent(this, SongInformationPage.class);
songView.putExtra("song_name", songName);
songView.putExtra("tag1_name", tag1);
songView.putExtra("tag2_name", tag2);
songView.putExtra("tag3_name", tag3);
startActivity(songView);
}
......
......@@ -34,6 +34,7 @@
android:layout_marginTop="84dp"
android:layout_marginEnd="48dp"
android:layout_marginRight="48dp"
android:onClick="settingsViewOnClick"
android:text="Settings"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.soulfood_assignment2.playlistView">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:text="SoulFood"
android:textColor="#000000"
android:textSize="36sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ListView
android:id="@+id/playlistView"
android:layout_width="wrap_content"
android:layout_height="400dp"
android:layout_marginTop="200dp"
android:layout_marginBottom="153dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10"></ListView>
<Button
android:id="@+id/saveButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginLeft="72dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="39dp"
android:layout_marginRight="39dp"
android:layout_marginBottom="49dp"
android:text="Save"
app:layout_constraintBottom_toTopOf="@+id/playlistView"
app:layout_constraintEnd_toStartOf="@+id/button5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="39dp"
android:layout_marginLeft="39dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="100dp"
android:layout_marginRight="100dp"
android:layout_marginBottom="49dp"
android:text="New Search"
app:layout_constraintBottom_toTopOf="@+id/playlistView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/saveButton"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
</android.support.constraint.ConstraintLayout>
......@@ -22,10 +22,9 @@
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.51" />
app:layout_constraintVertical_bias="0.49" />
<ListView
android:id="@+id/listViewPlaylists"
android:layout_width="395dp"
android:layout_height="640dp"
android:layout_marginStart="8dp"
......
......@@ -12,99 +12,14 @@
android:layout_height="41dp"
android:layout_marginStart="62dp"
android:layout_marginLeft="62dp"
android:layout_marginTop="104dp"
android:layout_marginEnd="44dp"
android:layout_marginRight="44dp"
android:layout_marginBottom="41dp"
android:text="Revert to factory settings"
android:layout_marginBottom="50dp"
android:text="Test"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/occasion_dropdown4" />
<Spinner
android:id="@+id/occasion_dropdown4"
android:layout_width="247dp"
android:layout_height="30dp"
android:layout_marginStart="59dp"
android:layout_marginLeft="59dp"
android:layout_marginTop="42dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:background="?android:attr/colorButtonNormal"
android:spinnerMode="dropdown"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/textView15"
app:layout_constraintTop_toBottomOf="@+id/textsizeDropdown" />
<TextView
android:id="@+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="28dp"
android:layout_marginLeft="28dp"
android:layout_marginTop="52dp"
android:text="Colour Blind"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView14" />
<Spinner
android:id="@+id/textsizeDropdown"
android:layout_width="247dp"
android:layout_height="30dp"
android:layout_marginStart="58dp"
android:layout_marginLeft="58dp"
android:layout_marginTop="42dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:background="?android:attr/colorButtonNormal"
android:spinnerMode="dropdown"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView14"
app:layout_constraintTop_toBottomOf="@+id/eq_dropdown" />
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="29dp"
android:layout_marginLeft="29dp"
android:layout_marginTop="42dp"
android:text="Text Size"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView13" />
<Spinner
android:id="@+id/eq_dropdown"
android:layout_width="247dp"
android:layout_height="30dp"
android:layout_marginStart="95dp"
android:layout_marginLeft="95dp"
android:layout_marginTop="36dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:background="?android:attr/colorButtonNormal"
android:spinnerMode="dropdown"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.95"
app:layout_constraintStart_toEndOf="@+id/textView13"
app:layout_constraintTop_toBottomOf="@+id/seekBar" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="44dp"
android:layout_marginLeft="44dp"
android:layout_marginTop="48dp"
android:text="EQ"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView12" />
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView11"
......@@ -127,9 +42,11 @@
android:layout_height="25dp"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="16dp"
android:layout_marginTop="80dp"
android:layout_marginEnd="22dp"
android:layout_marginRight="22dp"
android:layout_marginBottom="478dp"
app:layout_constraintBottom_toTopOf="@+id/factorySettings"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView12"
app:layout_constraintTop_toBottomOf="@+id/textView11" />
......@@ -140,30 +57,15 @@
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="25dp"
android:layout_marginTop="80dp"
android:layout_marginEnd="60dp"
android:layout_marginRight="60dp"
android:layout_marginBottom="484dp"
android:text="Volume"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@+id/factorySettings"
app:layout_constraintEnd_toStartOf="@+id/seekBar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView11" />
<Button
android:id="@+id/button"
android:layout_width="303dp"
android:layout_height="36dp"
android:layout_marginStart="62dp"
android:layout_marginLeft="62dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="44dp"
android:layout_marginRight="44dp"
android:layout_marginBottom="200dp"
android:text="Apply"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/factorySettings"
app:layout_constraintVertical_bias="1.0" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -4,80 +4,79 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.soulfood_assignment2.SongScreenView">
tools:context="com.example.soulfood_assignment2.SongInformationPage">
<TextView
android:id="@+id/songName"
android:id="@+id/songNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="165dp"
android:layout_marginBottom="40dp"
android:layout_marginBottom="550dp"
android:text="TextView"
android:textColor="#000000"
android:textSize="36sp"
app:layout_constraintBottom_toTopOf="@+id/textView7"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView7"
android:id="@+id/associatedTags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="45dp"
android:text="Associated Tags"
android:textColor="#000000"
android:layout_height="43dp"
android:layout_marginBottom="400dp"
android:text="Associated Tags "
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="@+id/vibeTagView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/songName" />
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/vibeTagView"
android:id="@+id/tag1View"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="45dp"
android:layout_marginBottom="375dp"
android:text="TextView"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView7" />
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/timeOfDayTagView"
android:id="@+id/tag2View"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="45dp"
android:layout_marginBottom="45dp"
android:layout_marginBottom="325dp"
android:text="TextView"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@+id/cuisineTagView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vibeTagView" />
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/cuisineTagView"
android:id="@+id/tag3View"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="45dp"
android:layout_marginBottom="275dp"
android:text="TextView"
android:textColor="#000000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timeOfDayTagView" />
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/playView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="96dp"
android:onClick="songPlayOnClick"
android:text="Play"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pauseView"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/button2"
android:id="@+id/pauseView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Play/Pause"
android:layout_marginBottom="96dp"
android:onClick="songPauseOnClick"
android:text="Pause"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="611dp" />
app:layout_constraintStart_toEndOf="@+id/playView" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.soulfood_assignment2.SongScreenView">
<TextView
android:id="@+id/songName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="500dp"
android:text="Song Name"
android:textSize="36sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="116dp"
android:layout_marginLeft="116dp"
android:layout_marginEnd="116dp"
android:layout_marginRight="116dp"
android:layout_marginBottom="400dp"
android:text="Associated Tags"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tag1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="275dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tag2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="200dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tag3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="350dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
......@@ -32,8 +32,7 @@
<item>m i s t</item>
<item>Deja Vu</item>
</string-array>
<string-array name="thaiSearchResultsArray">
</string-array>
<string-array name="thaiSearchResultsArray"></string-array>
<string-array name="indianSearchResultsArray">
<item>Lullaby from Home</item>
<item>Rebel Warrior</item>
......@@ -115,5 +114,6 @@
<string name="title_activity_home_screen_navigation">homeScreenNavigation</string>
<string name="title_activity_individual_playlist_screen">IndividualPlaylistScreen</string>
<string name="title_activity_individual_playlist">Playlist</string>
<string name="title_activity_song_screen_view">SongScreenView</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment