Set action bar, push server out of the table, begin undo action
This commit is contained in:
parent
97a83e930f
commit
b5d6fedffc
5
.idea/assetWizardSettings.xml
generated
5
.idea/assetWizardSettings.xml
generated
@ -120,7 +120,7 @@
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="url" value="jar:file:/C:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/action/ic_info_outline_black_24dp.xml" />
|
||||
<entry key="url" value="jar:file:/C:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/content/ic_redo_black_24dp.xml" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
@ -130,10 +130,9 @@
|
||||
</option>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="autoMirrored" value="true" />
|
||||
<entry key="color" value="ffffff" />
|
||||
<entry key="outputName" value="ic_ping_pong_table" />
|
||||
<entry key="outputName" value="ic_redo" />
|
||||
<entry key="sourceFile" value="C:\Users\adima\Downloads\ping-pong (3).svg" />
|
||||
</map>
|
||||
</option>
|
||||
|
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -13,6 +13,7 @@ android {
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -20,7 +20,11 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".CreditsActivity"
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar">
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar"
|
||||
android:parentActivityName=".MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".MainActivity"/>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
@ -1,12 +1,20 @@
|
||||
package adrienmalin.pingpoints
|
||||
|
||||
import android.content.Intent
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
|
||||
class CreditsActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_credits)
|
||||
setSupportActionBar(findViewById(R.id.toolbar))
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
finish()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class EndOfMatchDialog: DialogFragment() {
|
||||
setNeutralButton(
|
||||
R.string.share_button,
|
||||
DialogInterface.OnClickListener { dialog, id ->
|
||||
val sendIntent: Intent = Intent().apply {
|
||||
val newMatchIntent: Intent = Intent().apply {
|
||||
action = Intent.ACTION_SEND
|
||||
putExtra(
|
||||
Intent.EXTRA_SUBJECT,
|
||||
@ -59,7 +59,7 @@ class EndOfMatchDialog: DialogFragment() {
|
||||
)
|
||||
type = "text/plain"
|
||||
}
|
||||
startActivity(sendIntent)
|
||||
startActivity(newMatchIntent)
|
||||
}
|
||||
)
|
||||
/*setNegativeButton(
|
||||
|
@ -1,27 +1,34 @@
|
||||
package adrienmalin.pingpoints
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import android.os.Build
|
||||
import android.text.TextUtils.join
|
||||
import android.support.v7.app.AppCompatDelegate
|
||||
import android.view.Menu
|
||||
import android.widget.Toast
|
||||
import android.view.MenuItem
|
||||
import android.widget.ImageView
|
||||
|
||||
|
||||
class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogListener{
|
||||
var players: Array<Player> = emptyArray()
|
||||
var serviceSide: Side = Side.LEFT
|
||||
var relaunchSide: Side = Side.RIGHT
|
||||
|
||||
var textScore: android.widget.TextView? = null
|
||||
var textService: android.widget.TextView? = null
|
||||
var buttons: Array<Button> = emptyArray()
|
||||
var imageViews: Array<ImageView?> = emptyArray()
|
||||
var history: ArrayList<State> = ArrayList()
|
||||
var step: Int = 0
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||
setContentView(R.layout.activity_main)
|
||||
setSupportActionBar(findViewById(R.id.toolbar))
|
||||
|
||||
@ -41,22 +48,56 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis
|
||||
findViewById(R.id.buttonLeftPlayer),
|
||||
findViewById(R.id.buttonRightPlayer)
|
||||
)
|
||||
imageViews = arrayOf(
|
||||
findViewById(R.id.imgLeftService),
|
||||
findViewById(R.id.imgRightService)
|
||||
)
|
||||
|
||||
updateUI()
|
||||
|
||||
openStarterNameDialog()
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.main, menu)
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
|
||||
R.id.action_new_match -> {
|
||||
startActivity(
|
||||
Intent(this, MainActivity::class.java).apply {
|
||||
putExtra("names", players.map{ it.name }.toTypedArray())
|
||||
}
|
||||
)
|
||||
true
|
||||
}
|
||||
R.id.action_about -> {
|
||||
startActivity(Intent(this, CreditsActivity::class.java))
|
||||
true
|
||||
}
|
||||
else -> {
|
||||
super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
fun reloadState(): {
|
||||
history[step].apply{
|
||||
players.zip(score).forEach{(player, playerScore) -> player.score = playerScore}
|
||||
serviceSide = service
|
||||
relaunchSide = when(serviceSide) {
|
||||
Side.LEFT -> Side.RIGHT
|
||||
Side.RIGHT -> Side.LEFT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun openStarterNameDialog() {
|
||||
StarterNameDialog().apply {
|
||||
val names = players.map{ it.name }.toTypedArray()
|
||||
arguments = Bundle().apply {
|
||||
putStringArray("names", names)
|
||||
putStringArray("names", players.map{ it.name }.toTypedArray())
|
||||
}
|
||||
show(
|
||||
supportFragmentManager,
|
||||
"StarterNameDialog:" + join(" vs. ", names)
|
||||
)
|
||||
show( supportFragmentManager, "StarterNameDialog")
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,12 +123,12 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis
|
||||
|
||||
when (serviceSide) {
|
||||
Side.LEFT -> {
|
||||
buttons[Side.LEFT.value].setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_left_service, 0, 0, 0)
|
||||
buttons[Side.RIGHT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
|
||||
imageViews[Side.LEFT.value]?.setImageResource(R.drawable.ic_left_service)
|
||||
imageViews[Side.RIGHT.value]?.setImageResource(0)
|
||||
}
|
||||
Side.RIGHT -> {
|
||||
buttons[Side.LEFT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
|
||||
buttons[Side.RIGHT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_right_service, 0)
|
||||
imageViews[Side.LEFT.value]?.setImageResource(0)
|
||||
imageViews[Side.RIGHT.value]?.setImageResource(R.drawable.ic_right_service)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -101,6 +142,15 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis
|
||||
}
|
||||
|
||||
fun updateScore(scoringPlayer: Player) {
|
||||
val state = State(players.map { it.score }, serviceSide)
|
||||
if (step >= history.size) {
|
||||
history.add(state)
|
||||
} else {
|
||||
history.removeAt(step + 1)
|
||||
history[step] = state
|
||||
}
|
||||
step ++
|
||||
|
||||
if ( !matchIsFinished() ) {
|
||||
scoringPlayer.score++
|
||||
if (players.sumBy { it.score } % 2 == 0) {
|
||||
@ -125,10 +175,7 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis
|
||||
putString("winnerName", players.maxBy { it.score }?.name)
|
||||
putIntArray("score", players.map{ it.score }.sortedDescending().toIntArray())
|
||||
}
|
||||
show(
|
||||
supportFragmentManager,
|
||||
"EndOfMatchDialog"
|
||||
)
|
||||
show(supportFragmentManager,"EndOfMatchDialog")
|
||||
}
|
||||
}
|
||||
}
|
@ -17,6 +17,11 @@ enum class Side(val value:Int) {
|
||||
}
|
||||
|
||||
|
||||
data class State(
|
||||
val score: List<Int>,
|
||||
val service: Side
|
||||
)
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
fun fromHtml(html: String): Spanned {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
|
5
app/src/main/res/drawable/ic_redo.xml
Normal file
5
app/src/main/res/drawable/ic_redo.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="#FFFFFF" android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M18.4,10.6C16.55,8.99 14.15,8 11.5,8c-4.65,0 -8.58,3.03 -9.96,7.22L3.9,16c1.05,-3.19 4.05,-5.5 7.6,-5.5 1.95,0 3.73,0.72 5.12,1.88L13,16h9V7l-3.6,3.6z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_undo.xml
Normal file
5
app/src/main/res/drawable/ic_undo.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="#FFFFFF" android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12.5,8c-2.65,0 -5.05,0.99 -6.9,2.6L2,7v9h9l-3.62,-3.62c1.39,-1.16 3.16,-1.88 5.12,-1.88 3.54,0 6.55,2.31 7.6,5.5l2.37,-0.78C21.08,11.03 17.15,8 12.5,8z"/>
|
||||
</vector>
|
@ -6,6 +6,16 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".CreditsActivity">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -37,5 +47,6 @@
|
||||
android:text="@string/iconCredits"
|
||||
app:layout_constraintTop_toBottomOf="@+id/PingPointsCredit"
|
||||
tools:layout_editor_absoluteX="106dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -7,73 +7,107 @@
|
||||
tools:context=".MainActivity"
|
||||
tools:layout_editor_absoluteY="73dp">
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:layout_editor_absoluteY="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textService"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linearLayoutButtons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/textScore"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/service" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textScore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/score" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
<ImageView
|
||||
android:id="@+id/imgLeftService"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/service_img_description"
|
||||
app:srcCompat="@drawable/ic_left_service"
|
||||
tools:layout_editor_absoluteY="120dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonLeftPlayer"
|
||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:elevation="4dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linearLayoutText"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:layout_editor_absoluteY="8dp">
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorAccent"
|
||||
android:bufferType="spannable"
|
||||
android:onClick="onClickLeftPlayer"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imgLeftService"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/button_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textService"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linearLayoutButtons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/textScore"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/service" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textScore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/score" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutButtons"
|
||||
<Button
|
||||
android:id="@+id/buttonRightPlayer"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
@ -82,66 +116,30 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorAccent"
|
||||
android:bufferType="spannable"
|
||||
android:onClick="onClickRightPlayer"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutText">
|
||||
app:layout_constraintEnd_toStartOf="@+id/imgRightService"
|
||||
app:layout_constraintStart_toEndOf="@+id/buttonLeftPlayer"
|
||||
tools:text="@string/button_text" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonLeftPlayer"
|
||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorAccent"
|
||||
android:bufferType="spannable"
|
||||
android:drawableLeft="@drawable/ic_left_service"
|
||||
android:onClick="onClickLeftPlayer"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textScore"
|
||||
app:layout_constraintEnd_toStartOf="@+id/buttonRightPlayer"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textService"
|
||||
tools:text="@string/button_text" />
|
||||
<ImageView
|
||||
android:id="@+id/imgRightService"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/service_img_description"
|
||||
tools:layout_editor_absoluteY="120dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonRightPlayer"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorAccent"
|
||||
android:bufferType="spannable"
|
||||
android:onClick="onClickRightPlayer"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textScore"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/buttonLeftPlayer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textService"
|
||||
tools:text="@string/button_text" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -3,6 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:focusableInTouchMode="true"
|
||||
tools:context=".NomsJoueursEtPremierServeurDialog">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
|
16
app/src/main/res/menu/main.xml
Normal file
16
app/src/main/res/menu/main.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_new_match"
|
||||
android:icon="@drawable/ic_new_match"
|
||||
android:title="@string/new_match"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:icon="@drawable/ic_about"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
@ -20,4 +20,5 @@
|
||||
<string name="PingPointsCredits">Ping Points par Adrien Malingrey</string>
|
||||
<string name="iconCredits"><div>Icônes par <a href="http://www.freepik.com" title="Freepik">Freepik</a> chez <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> Licence <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div></string>
|
||||
<string name="about">À propos</string>
|
||||
<string name="service_img_description">Service</string>
|
||||
</resources>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#016DF5</color>
|
||||
<color name="colorPrimary">#016df5</color>
|
||||
<color name="colorPrimaryDark">#004aa7</color>
|
||||
<color name="colorAccent">#0088FF</color>
|
||||
</resources>
|
@ -21,4 +21,5 @@
|
||||
<string name="PingPointsCredits">Ping Points by Adrien Malingrey</string>
|
||||
<string name="iconCredits">Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></string>
|
||||
<string name="about">About</string>
|
||||
<string name="service_img_description">Service</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user