UI Improvements, added artist display for track, added track duration
This commit is contained in:
Generated
-8
@@ -1,13 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module external.linked.project.id="Mear" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
<module external.linked.project.id="Mear" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||||
<component name="FacetManager">
|
|
||||||
<facet type="java-gradle" name="Java-Gradle">
|
|
||||||
<configuration>
|
|
||||||
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
|
|
||||||
<option name="BUILDABLE" value="false" />
|
|
||||||
</configuration>
|
|
||||||
</facet>
|
|
||||||
</component>
|
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
|
|||||||
Generated
+112
@@ -1,5 +1,8 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
|
<AndroidXmlCodeStyleSettings>
|
||||||
|
<option name="USE_CUSTOM_SETTINGS" value="true" />
|
||||||
|
</AndroidXmlCodeStyleSettings>
|
||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
</JetCodeStyleSettings>
|
</JetCodeStyleSettings>
|
||||||
@@ -28,6 +31,115 @@
|
|||||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||||
</extensions>
|
</extensions>
|
||||||
</Objective-C-extensions>
|
</Objective-C-extensions>
|
||||||
|
<XML>
|
||||||
|
<option name="XML_KEEP_LINE_BREAKS" value="false" />
|
||||||
|
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
|
||||||
|
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||||
|
</XML>
|
||||||
|
<codeStyleSettings language="XML">
|
||||||
|
<option name="FORCE_REARRANGE_MODE" value="1" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
|
<arrangement>
|
||||||
|
<rules>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:android</NAME>
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:.*</NAME>
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:id</NAME>
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:name</NAME>
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>style</NAME>
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
</rules>
|
||||||
|
</arrangement>
|
||||||
|
</codeStyleSettings>
|
||||||
<codeStyleSettings language="kotlin">
|
<codeStyleSettings language="kotlin">
|
||||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
|
|||||||
@@ -12,15 +12,15 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".SettingsActivity"
|
android:name=".activities.SettingsActivity"
|
||||||
android:label="@string/title_activity_settings"
|
android:label="@string/title_activity_settings"
|
||||||
android:parentActivityName=".MainActivity">
|
android:parentActivityName=".activities.MainActivity">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="com.example.mear.MainActivity"/>
|
android:value="com.example.mear.activities.MainActivity"/>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:label="@string/title_activity_main"
|
android:label="@string/title_activity_main"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
+20
-3
@@ -1,4 +1,4 @@
|
|||||||
package com.example.mear
|
package com.example.mear.activities
|
||||||
|
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.media.MediaPlayer
|
import android.media.MediaPlayer
|
||||||
@@ -6,6 +6,8 @@ import android.media.MediaMetadataRetriever
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Environment
|
import android.os.Environment
|
||||||
import android.support.v7.app.AppCompatActivity
|
import android.support.v7.app.AppCompatActivity
|
||||||
|
import android.text.format.Time
|
||||||
|
import com.example.mear.R
|
||||||
|
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
@@ -16,6 +18,12 @@ import kotlin.random.Random
|
|||||||
import com.example.mear.management.MusicFiles
|
import com.example.mear.management.MusicFiles
|
||||||
import com.example.mear.management.TrackManager
|
import com.example.mear.management.TrackManager
|
||||||
import com.example.mear.repositories.TrackRepository
|
import com.example.mear.repositories.TrackRepository
|
||||||
|
import kotlinx.android.synthetic.main.fragment_play_controls.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_track_cover.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_track_details.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_track_elapsing.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_track_flow.*
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
@@ -147,8 +155,13 @@ class MainActivity : AppCompatActivity() {
|
|||||||
private fun configureTrackDisplay() {
|
private fun configureTrackDisplay() {
|
||||||
val currTrack = TrackRepository(this).getTrack(currentSong!!)
|
val currTrack = TrackRepository(this).getTrack(currentSong!!)
|
||||||
val trackTitle = currTrack.title
|
val trackTitle = currTrack.title
|
||||||
|
val artistTitle = currTrack.artist
|
||||||
val albumTitle = currTrack.album
|
val albumTitle = currTrack.album
|
||||||
|
var trackDuration = currTrack.length
|
||||||
var trackCover: ByteArray? = null
|
var trackCover: ByteArray? = null
|
||||||
|
val dur = String.format("%02d:%02d", TimeUnit.SECONDS.toMinutes(trackDuration.toLong()),
|
||||||
|
(trackDuration % 60)
|
||||||
|
)
|
||||||
|
|
||||||
var mmr = MediaMetadataRetriever()
|
var mmr = MediaMetadataRetriever()
|
||||||
mmr.setDataSource(currTrack.songPath)
|
mmr.setDataSource(currTrack.songPath)
|
||||||
@@ -157,12 +170,16 @@ class MainActivity : AppCompatActivity() {
|
|||||||
trackCover = mmr.embeddedPicture
|
trackCover = mmr.embeddedPicture
|
||||||
}
|
}
|
||||||
|
|
||||||
TrackTitle.text.clear()
|
TrackTitle.setText(null)
|
||||||
AlbumTitle.text.clear()
|
ArtistTitle.setText(null)
|
||||||
|
AlbumTitle.setText(null)
|
||||||
|
CurrentPosition.setText(null)
|
||||||
TrackCover.setImageBitmap(null)
|
TrackCover.setImageBitmap(null)
|
||||||
|
|
||||||
TrackTitle.setText(trackTitle)
|
TrackTitle.setText(trackTitle)
|
||||||
|
ArtistTitle.setText(artistTitle)
|
||||||
AlbumTitle.setText(albumTitle)
|
AlbumTitle.setText(albumTitle)
|
||||||
|
TrackDuration.setText(dur)
|
||||||
if (trackCover != null) {
|
if (trackCover != null) {
|
||||||
val songImage = BitmapFactory
|
val songImage = BitmapFactory
|
||||||
.decodeByteArray(trackCover, 0, trackCover.size)
|
.decodeByteArray(trackCover, 0, trackCover.size)
|
||||||
+5
-2
@@ -1,4 +1,4 @@
|
|||||||
package com.example.mear
|
package com.example.mear.activities
|
||||||
|
|
||||||
import android.annotation.TargetApi
|
import android.annotation.TargetApi
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -17,6 +17,8 @@ import android.preference.RingtonePreference
|
|||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.support.v4.app.NavUtils
|
import android.support.v4.app.NavUtils
|
||||||
|
import com.example.mear.AppCompatPreferenceActivity
|
||||||
|
import com.example.mear.R
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A [PreferenceActivity] that presents a set of application settings. On
|
* A [PreferenceActivity] that presents a set of application settings. On
|
||||||
@@ -237,7 +239,8 @@ class SettingsActivity : AppCompatPreferenceActivity() {
|
|||||||
*/
|
*/
|
||||||
private fun bindPreferenceSummaryToValue(preference: Preference) {
|
private fun bindPreferenceSummaryToValue(preference: Preference) {
|
||||||
// Set the listener to watch for value changes.
|
// Set the listener to watch for value changes.
|
||||||
preference.onPreferenceChangeListener = sBindPreferenceSummaryToValueListener
|
preference.onPreferenceChangeListener =
|
||||||
|
sBindPreferenceSummaryToValueListener
|
||||||
|
|
||||||
// Trigger the listener immediately with the preference's
|
// Trigger the listener immediately with the preference's
|
||||||
// current value.
|
// current value.
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".MainActivity">
|
tools:context=".activities.MainActivity">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent" android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -1,76 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:showIn="@layout/activity_main"
|
tools:context=".activities.MainActivity"
|
||||||
tools:context=".MainActivity">
|
tools:showIn="@layout/activity_main">
|
||||||
|
|
||||||
<LinearLayout
|
<include
|
||||||
android:orientation="vertical"
|
layout="@layout/fragment_track_cover"
|
||||||
android:layout_width="match_parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
android:layout_height="match_parent" tools:layout_editor_absoluteY="16dp"
|
|
||||||
tools:layout_editor_absoluteX="0dp">
|
<include layout="@layout/fragment_track_details" />
|
||||||
<ImageView
|
|
||||||
tools:srcCompat="@tools:sample/backgrounds/scenic[2]"
|
<include layout="@layout/fragment_track_flow" />
|
||||||
android:id="@+id/TrackCover" android:layout_height="269dp"
|
|
||||||
android:layout_width="match_parent"/>
|
<include layout="@layout/fragment_track_elapsing" />
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
<include
|
||||||
android:layout_width="match_parent"
|
layout="@layout/fragment_play_controls"
|
||||||
android:layout_height="wrap_content">
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
<EditText
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:text="Track Title"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/TrackTitle"/>
|
|
||||||
<EditText
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:text="Album Title"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/AlbumTitle"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<Button
|
|
||||||
android:text="Shuffle"
|
|
||||||
android:layout_height="wrap_content" android:id="@+id/ShuffleTracks" android:layout_weight="1"
|
|
||||||
android:layout_width="21dp"/>
|
|
||||||
<Button
|
|
||||||
android:text="Repeat"
|
|
||||||
android:layout_height="wrap_content" android:id="@+id/RepeatList" android:layout_weight="1"
|
|
||||||
android:layout_width="1dp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent" android:layout_height="wrap_content">
|
|
||||||
<SeekBar
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:id="@+id/TrackProgress" android:layout_weight="1" android:layout_height="50dp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<Button
|
|
||||||
android:text="Previous"
|
|
||||||
android:baselineAligned="false" android:layout_height="match_parent"
|
|
||||||
android:layout_width="111dp" android:id="@+id/PreviousTrack"/>
|
|
||||||
<Button
|
|
||||||
android:text="Play"
|
|
||||||
android:id="@+id/PlayTrack" android:layout_width="135dp" android:layout_height="match_parent"/>
|
|
||||||
<Button
|
|
||||||
android:text="Next"
|
|
||||||
android:layout_height="match_parent" android:id="@+id/NextTrack" android:layout_width="162dp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/PreviousTrack"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/previous_button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/PlayTrack"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="64dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/play_button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/PreviousTrack" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/NextTrack"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/next_button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.864"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/PlayTrack" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/TrackCover"
|
||||||
|
android:layout_width="392dp"
|
||||||
|
android:layout_height="316dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.095"
|
||||||
|
tools:srcCompat="@tools:sample/backgrounds/scenic[1]" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/TrackTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="388dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ArtistTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/TrackTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/AlbumTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="240dp"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/ArtistTitle"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seekBar2"
|
||||||
|
android:layout_width="261dp"
|
||||||
|
android:layout_height="27dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/TrackDuration"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.889" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/CurrentPosition"
|
||||||
|
android:layout_width="63dp"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginBottom="84dp"
|
||||||
|
android:text="TextView"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/TrackDuration"
|
||||||
|
android:layout_width="63dp"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_marginBottom="84dp"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/ShuffleTracks"
|
||||||
|
android:layout_width="62dp"
|
||||||
|
android:layout_height="47dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="S"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/RepeatTrack"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.826" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/RepeatTrack"
|
||||||
|
android:layout_width="62dp"
|
||||||
|
android:layout_height="47dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="R"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.826" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -12,6 +12,10 @@
|
|||||||
<string name="shuffle_off">Shuffle Off</string>
|
<string name="shuffle_off">Shuffle Off</string>
|
||||||
<string name="title_activity_settings">Settings</string>
|
<string name="title_activity_settings">Settings</string>
|
||||||
|
|
||||||
|
<string name="play_button">Play</string>
|
||||||
|
<string name="next_button">Next</string>
|
||||||
|
<string name="previous_button">Previous </string>
|
||||||
|
|
||||||
<!-- Strings related to Settings -->
|
<!-- Strings related to Settings -->
|
||||||
|
|
||||||
<!-- Example General settings -->
|
<!-- Example General settings -->
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
<!-- These settings headers are only used on tablets. -->
|
<!-- These settings headers are only used on tablets. -->
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="com.example.mear.SettingsActivity$GeneralPreferenceFragment"
|
android:fragment="com.example.mear.activities.SettingsActivity$GeneralPreferenceFragment"
|
||||||
android:title="@string/pref_header_general"
|
android:title="@string/pref_header_general"
|
||||||
android:icon="@drawable/ic_info_black_24dp"/>
|
android:icon="@drawable/ic_info_black_24dp"/>
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="com.example.mear.SettingsActivity$NotificationPreferenceFragment"
|
android:fragment="com.example.mear.activities.SettingsActivity$NotificationPreferenceFragment"
|
||||||
android:title="@string/pref_header_notifications"
|
android:title="@string/pref_header_notifications"
|
||||||
android:icon="@drawable/ic_notifications_black_24dp"/>
|
android:icon="@drawable/ic_notifications_black_24dp"/>
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="com.example.mear.SettingsActivity$DataSyncPreferenceFragment"
|
android:fragment="com.example.mear.activities.SettingsActivity$DataSyncPreferenceFragment"
|
||||||
android:title="@string/pref_header_data_sync"
|
android:title="@string/pref_header_data_sync"
|
||||||
android:icon="@drawable/ic_sync_black_24dp"/>
|
android:icon="@drawable/ic_sync_black_24dp"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user