mirror of
https://github.com/hmalik144/Udacity_Project_4---Musical_Structure.git
synced 2025-12-10 02:45:20 +00:00
Initial commit
This commit is contained in:
1
app/.gitignore
vendored
Normal file
1
app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
29
app/build.gradle
Normal file
29
app/build.gradle
Normal file
@@ -0,0 +1,29 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "25.0.0"
|
||||
defaultConfig {
|
||||
applicationId "com.example.h_mal.myapplication"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 24
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
compile 'com.android.support:appcompat-v7:24.2.1'
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
17
app/proguard-rules.pro
vendored
Normal file
17
app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in C:\Users\h_mal\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumentation test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.example.h_mal.myapplication", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
30
app/src/main/AndroidManifest.xml
Normal file
30
app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.h_mal.myapplication">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MusicalStructure">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".SongsActivity"
|
||||
android:label="Songs"/>
|
||||
<activity android:name=".ArtistsActivity"
|
||||
android:label="Artists"/>
|
||||
<activity android:name=".AlbumsActivity"
|
||||
android:label="Albums"/>
|
||||
<activity android:name=".GenresActivity"
|
||||
android:label="Genres"/>
|
||||
<activity android:name=".YearActivity"
|
||||
android:label="Year"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class AlbumsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_albums);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class ArtistsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_artists);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class GenresActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_genres);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MusicalStructure extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_musical_structure);
|
||||
|
||||
|
||||
// Find the View that shows the songs category
|
||||
TextView songs = (TextView) findViewById(R.id.songs);
|
||||
|
||||
// Set a click listener on that View
|
||||
songs.setOnClickListener(new View.OnClickListener() {
|
||||
// The code in this method will be executed when the songs View is clicked on.
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent songsIntent = new Intent(MusicalStructure.this, SongsActivity.class);
|
||||
startActivity(songsIntent);
|
||||
}
|
||||
});
|
||||
|
||||
// Find the View that shows the artists category
|
||||
TextView artists = (TextView) findViewById(R.id.artists);
|
||||
|
||||
// Set a click artists on that View
|
||||
artists.setOnClickListener(new View.OnClickListener() {
|
||||
// The code in this method will be executed when the artists View is clicked on.
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent artistsIntent = new Intent(MusicalStructure.this, ArtistsActivity.class);
|
||||
startActivity(artistsIntent);
|
||||
}
|
||||
});
|
||||
|
||||
// Find the View that shows the albums category
|
||||
TextView albums = (TextView) findViewById(R.id.albums);
|
||||
|
||||
// Set a click albums on that View
|
||||
albums.setOnClickListener(new View.OnClickListener() {
|
||||
// The code in this method will be executed when the albums View is clicked on.
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent albumsIntent = new Intent(MusicalStructure.this, AlbumsActivity.class);
|
||||
startActivity(albumsIntent);
|
||||
}
|
||||
});
|
||||
|
||||
// Find the View that shows the genres category
|
||||
TextView genres = (TextView) findViewById(R.id.genres);
|
||||
|
||||
// Set a click genres on that View
|
||||
genres.setOnClickListener(new View.OnClickListener() {
|
||||
// The code in this method will be executed when the genres View is clicked on.
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent genresIntent = new Intent(MusicalStructure.this, GenresActivity.class);
|
||||
startActivity(genresIntent);
|
||||
}
|
||||
});
|
||||
|
||||
// Find the View that shows the year category
|
||||
TextView year = (TextView) findViewById(R.id.year);
|
||||
|
||||
// Set a click year on that View
|
||||
year.setOnClickListener(new View.OnClickListener() {
|
||||
// The code in this method will be executed when the artists View is clicked on.
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent yearIntent = new Intent(MusicalStructure.this, YearActivity.class);
|
||||
startActivity(yearIntent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class SongsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_songs);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class YearActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_year);
|
||||
}
|
||||
}
|
||||
11
app/src/main/res/drawable/background_color.xml
Normal file
11
app/src/main/res/drawable/background_color.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<gradient
|
||||
android:startColor="@color/gradient_start"
|
||||
android:endColor="@color/gradient_end"
|
||||
android:angle="270" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
63
app/src/main/res/layout/activity_albums.xml
Normal file
63
app/src/main/res/layout/activity_albums.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_albums"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.AlbumsActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Album 1 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Genre*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Album 2 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Genre*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Album 3 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Genre*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="The songs are categorised by Album name. Clicking on an album will load the songs in that album"/>
|
||||
</LinearLayout>
|
||||
53
app/src/main/res/layout/activity_artists.xml
Normal file
53
app/src/main/res/layout/activity_artists.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_artists"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.ArtistsActivity">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Artist 1 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs by artists*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Artist 2 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs by artists*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Artist 3 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs by artists*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="The songs are categorised by Artist name. Clicking on an artist will load their songs"/>
|
||||
</LinearLayout>
|
||||
54
app/src/main/res/layout/activity_genres.xml
Normal file
54
app/src/main/res/layout/activity_genres.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_genres"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.GenresActivity">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Genre 1*" />
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in genre*"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Genre 2*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in genre*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Genre 3*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in genre*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="The songs are categorised by genres. Clicking on a genre will load the songs in that genre"/>
|
||||
</LinearLayout>
|
||||
37
app/src/main/res/layout/activity_musical_structure.xml
Normal file
37
app/src/main/res/layout/activity_musical_structure.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_musical_structure"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:drawable/bottom_bar"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.MusicalStructure">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songs"
|
||||
style="@style/Text"
|
||||
android:text="Songs" />
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:id="@+id/artists"
|
||||
style="@style/Text"
|
||||
android:text="Artists" />
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:id="@+id/albums"
|
||||
style="@style/Text"
|
||||
android:text="Albums" />
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:id="@+id/genres"
|
||||
style="@style/Text"
|
||||
android:text="Genres" />
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:id="@+id/year"
|
||||
style="@style/Text"
|
||||
android:text="Year" />
|
||||
<View style="@style/Divider"/>
|
||||
</LinearLayout>
|
||||
62
app/src/main/res/layout/activity_songs.xml
Normal file
62
app/src/main/res/layout/activity_songs.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_songs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.SongsActivity">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Song 1 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Album name*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Song 2 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Album name*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Song 3 name*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*Artist*"/>
|
||||
<TextView
|
||||
style="@style/TertiaryText"
|
||||
android:text="*Album name*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="All songs are displayed in alphabetical order"/>
|
||||
</LinearLayout>
|
||||
54
app/src/main/res/layout/activity_year.xml
Normal file
54
app/src/main/res/layout/activity_year.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_year"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:context="com.example.h_mal.myapplication.YearActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Year group 1*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in year group*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Year group 2*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in year group*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp">
|
||||
<TextView
|
||||
style="@style/PrimaryText"
|
||||
android:text="*Year group 3*"/>
|
||||
<TextView
|
||||
style="@style/SecondaryText"
|
||||
android:text="*number of songs in year group*"/>
|
||||
</LinearLayout>
|
||||
<View style="@style/Divider"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="The songs are categorised by Which year they were release. Clicking on a year will load the songs in that year"/>
|
||||
</LinearLayout>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
||||
8
app/src/main/res/values/colors.xml
Normal file
8
app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#66BB6A</color>
|
||||
<color name="colorPrimaryDark">#388E3C</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="gradient_start">#E8F5E9</color>
|
||||
<color name="gradient_end">#008000</color>
|
||||
</resources>
|
||||
5
app/src/main/res/values/dimens.xml
Normal file
5
app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
||||
3
app/src/main/res/values/strings.xml
Normal file
3
app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">Music App</string>
|
||||
</resources>
|
||||
48
app/src/main/res/values/styles.xml
Normal file
48
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="Text">
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_height">88dp</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="PrimaryText">
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="SecondaryText">
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="TertiaryText">
|
||||
<item name="android:textColor">@android:color/darker_gray</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
<style name="Divider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.example.h_mal.myapplication;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user