Set action bar, push server out of the table, begin undo action
This commit is contained in:
		
							
								
								
									
										5
									
								
								.idea/assetWizardSettings.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								.idea/assetWizardSettings.xml
									
									
									
										generated
									
									
									
								
							| @ -120,7 +120,7 @@ | |||||||
|                                 <PersistentState> |                                 <PersistentState> | ||||||
|                                   <option name="values"> |                                   <option name="values"> | ||||||
|                                     <map> |                                     <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> |                                     </map> | ||||||
|                                   </option> |                                   </option> | ||||||
|                                 </PersistentState> |                                 </PersistentState> | ||||||
| @ -130,10 +130,9 @@ | |||||||
|                         </option> |                         </option> | ||||||
|                         <option name="values"> |                         <option name="values"> | ||||||
|                           <map> |                           <map> | ||||||
|                             <entry key="assetSourceType" value="FILE" /> |  | ||||||
|                             <entry key="autoMirrored" value="true" /> |                             <entry key="autoMirrored" value="true" /> | ||||||
|                             <entry key="color" value="ffffff" /> |                             <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" /> |                             <entry key="sourceFile" value="C:\Users\adima\Downloads\ping-pong (3).svg" /> | ||||||
|                           </map> |                           </map> | ||||||
|                         </option> |                         </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 |         versionCode 1 | ||||||
|         versionName "1.0" |         versionName "1.0" | ||||||
|         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||||||
|  |         vectorDrawables.useSupportLibrary true | ||||||
|     } |     } | ||||||
|     buildTypes { |     buildTypes { | ||||||
|         release { |         release { | ||||||
|  | |||||||
| @ -20,7 +20,11 @@ | |||||||
|         </activity> |         </activity> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".CreditsActivity" |             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> |         </activity> | ||||||
|     </application> |     </application> | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,12 +1,20 @@ | |||||||
| package adrienmalin.pingpoints | package adrienmalin.pingpoints | ||||||
|  |  | ||||||
|  | import android.content.Intent | ||||||
| import android.support.v7.app.AppCompatActivity | import android.support.v7.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
|  | import android.view.MenuItem | ||||||
|  |  | ||||||
| class CreditsActivity : AppCompatActivity() { | class CreditsActivity : AppCompatActivity() { | ||||||
|  |  | ||||||
|     override fun onCreate(savedInstanceState: Bundle?) { |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|         super.onCreate(savedInstanceState) |         super.onCreate(savedInstanceState) | ||||||
|         setContentView(R.layout.activity_credits) |         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( |             setNeutralButton( | ||||||
|                     R.string.share_button, |                     R.string.share_button, | ||||||
|                     DialogInterface.OnClickListener { dialog, id -> |                     DialogInterface.OnClickListener { dialog, id -> | ||||||
|                         val sendIntent: Intent = Intent().apply { |                         val newMatchIntent: Intent = Intent().apply { | ||||||
|                             action = Intent.ACTION_SEND |                             action = Intent.ACTION_SEND | ||||||
|                             putExtra( |                             putExtra( | ||||||
|                                     Intent.EXTRA_SUBJECT, |                                     Intent.EXTRA_SUBJECT, | ||||||
| @ -59,7 +59,7 @@ class EndOfMatchDialog: DialogFragment() { | |||||||
|                             ) |                             ) | ||||||
|                             type = "text/plain" |                             type = "text/plain" | ||||||
|                         } |                         } | ||||||
|                         startActivity(sendIntent) |                         startActivity(newMatchIntent) | ||||||
|                     } |                     } | ||||||
|             ) |             ) | ||||||
|             /*setNegativeButton( |             /*setNegativeButton( | ||||||
|  | |||||||
| @ -1,27 +1,34 @@ | |||||||
| package adrienmalin.pingpoints | package adrienmalin.pingpoints | ||||||
|  |  | ||||||
|  | import android.content.Intent | ||||||
| import android.content.pm.ActivityInfo | import android.content.pm.ActivityInfo | ||||||
| import android.support.v7.app.AppCompatActivity | import android.support.v7.app.AppCompatActivity | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.view.View | import android.view.View | ||||||
| import android.widget.Button | import android.widget.Button | ||||||
| import android.os.Build | 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.widget.Toast | ||||||
|  | import android.view.MenuItem | ||||||
|  | import android.widget.ImageView | ||||||
|  |  | ||||||
|  |  | ||||||
| class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogListener{ | class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogListener{ | ||||||
|     var players: Array<Player> = emptyArray() |     var players: Array<Player> = emptyArray() | ||||||
|     var serviceSide: Side = Side.LEFT |     var serviceSide: Side = Side.LEFT | ||||||
|     var relaunchSide: Side = Side.RIGHT |     var relaunchSide: Side = Side.RIGHT | ||||||
|  |  | ||||||
|     var textScore: android.widget.TextView? = null |     var textScore: android.widget.TextView? = null | ||||||
|     var textService: android.widget.TextView? = null |     var textService: android.widget.TextView? = null | ||||||
|     var buttons: Array<Button> = emptyArray() |     var buttons: Array<Button> = emptyArray() | ||||||
|  |     var imageViews: Array<ImageView?> = emptyArray() | ||||||
|  |     var history: ArrayList<State> = ArrayList() | ||||||
|  |     var step: Int = 0 | ||||||
|  |  | ||||||
|  |  | ||||||
|     override fun onCreate(savedInstanceState: Bundle?) { |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|         super.onCreate(savedInstanceState) |         super.onCreate(savedInstanceState) | ||||||
|  |         AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); | ||||||
|         setContentView(R.layout.activity_main) |         setContentView(R.layout.activity_main) | ||||||
|         setSupportActionBar(findViewById(R.id.toolbar)) |         setSupportActionBar(findViewById(R.id.toolbar)) | ||||||
|  |  | ||||||
| @ -41,22 +48,56 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis | |||||||
|                 findViewById(R.id.buttonLeftPlayer), |                 findViewById(R.id.buttonLeftPlayer), | ||||||
|                 findViewById(R.id.buttonRightPlayer) |                 findViewById(R.id.buttonRightPlayer) | ||||||
|         ) |         ) | ||||||
|  |         imageViews = arrayOf( | ||||||
|  |                 findViewById(R.id.imgLeftService), | ||||||
|  |                 findViewById(R.id.imgRightService) | ||||||
|  |         ) | ||||||
|  |  | ||||||
|         updateUI() |         updateUI() | ||||||
|  |  | ||||||
|         openStarterNameDialog() |         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() { |     fun openStarterNameDialog() { | ||||||
|         StarterNameDialog().apply { |         StarterNameDialog().apply { | ||||||
|             val names = players.map{ it.name }.toTypedArray() |  | ||||||
|             arguments = Bundle().apply { |             arguments = Bundle().apply { | ||||||
|                 putStringArray("names", names) |                 putStringArray("names", players.map{ it.name }.toTypedArray()) | ||||||
|             } |             } | ||||||
|             show( |             show( supportFragmentManager, "StarterNameDialog") | ||||||
|                 supportFragmentManager, |  | ||||||
|                 "StarterNameDialog:" + join(" vs. ", names) |  | ||||||
|             ) |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -82,12 +123,12 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis | |||||||
|  |  | ||||||
|         when (serviceSide) { |         when (serviceSide) { | ||||||
|             Side.LEFT -> { |             Side.LEFT -> { | ||||||
|                 buttons[Side.LEFT.value].setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_left_service, 0, 0, 0) |                 imageViews[Side.LEFT.value]?.setImageResource(R.drawable.ic_left_service) | ||||||
|                 buttons[Side.RIGHT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0) |                 imageViews[Side.RIGHT.value]?.setImageResource(0) | ||||||
|             } |             } | ||||||
|             Side.RIGHT -> { |             Side.RIGHT -> { | ||||||
|                 buttons[Side.LEFT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0) |                 imageViews[Side.LEFT.value]?.setImageResource(0) | ||||||
|                 buttons[Side.RIGHT.value].setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_right_service, 0) |                 imageViews[Side.RIGHT.value]?.setImageResource(R.drawable.ic_right_service) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| @ -101,6 +142,15 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     fun updateScore(scoringPlayer: Player) { |     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() ) { |         if ( !matchIsFinished() ) { | ||||||
|             scoringPlayer.score++ |             scoringPlayer.score++ | ||||||
|             if (players.sumBy { it.score } % 2 == 0) { |             if (players.sumBy { it.score } % 2 == 0) { | ||||||
| @ -125,10 +175,7 @@ class MainActivity : AppCompatActivity(), StarterNameDialog.StarterNameDialogLis | |||||||
|                 putString("winnerName", players.maxBy { it.score }?.name) |                 putString("winnerName", players.maxBy { it.score }?.name) | ||||||
|                 putIntArray("score", players.map{ it.score }.sortedDescending().toIntArray()) |                 putIntArray("score", players.map{ it.score }.sortedDescending().toIntArray()) | ||||||
|             } |             } | ||||||
|             show( |             show(supportFragmentManager,"EndOfMatchDialog") | ||||||
|                     supportFragmentManager, |  | ||||||
|                     "EndOfMatchDialog" |  | ||||||
|             ) |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -17,6 +17,11 @@ enum class Side(val value:Int) { | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | data class State( | ||||||
|  |         val score: List<Int>, | ||||||
|  |         val service: Side | ||||||
|  | ) | ||||||
|  |  | ||||||
| @SuppressWarnings("deprecation") | @SuppressWarnings("deprecation") | ||||||
| fun fromHtml(html: String): Spanned { | fun fromHtml(html: String): Spanned { | ||||||
|     return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |     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" |     android:layout_height="match_parent" | ||||||
|     tools:context=".CreditsActivity"> |     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 |     <LinearLayout | ||||||
|         android:layout_width="wrap_content" |         android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
| @ -37,5 +47,6 @@ | |||||||
|             android:text="@string/iconCredits" |             android:text="@string/iconCredits" | ||||||
|             app:layout_constraintTop_toBottomOf="@+id/PingPointsCredit" |             app:layout_constraintTop_toBottomOf="@+id/PingPointsCredit" | ||||||
|             tools:layout_editor_absoluteX="106dp" /> |             tools:layout_editor_absoluteX="106dp" /> | ||||||
|  |  | ||||||
|     </LinearLayout> |     </LinearLayout> | ||||||
| </android.support.constraint.ConstraintLayout> | </android.support.constraint.ConstraintLayout> | ||||||
| @ -7,10 +7,6 @@ | |||||||
|     tools:context=".MainActivity" |     tools:context=".MainActivity" | ||||||
|     tools:layout_editor_absoluteY="73dp"> |     tools:layout_editor_absoluteY="73dp"> | ||||||
|  |  | ||||||
|     <FrameLayout |  | ||||||
|         android:layout_width="match_parent" |  | ||||||
|         android:layout_height="match_parent"> |  | ||||||
|  |  | ||||||
|     <LinearLayout |     <LinearLayout | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="match_parent" |         android:layout_height="match_parent" | ||||||
| @ -24,7 +20,6 @@ | |||||||
|             android:background="@color/colorPrimary" |             android:background="@color/colorPrimary" | ||||||
|             android:elevation="4dp" |             android:elevation="4dp" | ||||||
|             android:theme="@style/ThemeOverlay.AppCompat.ActionBar" |             android:theme="@style/ThemeOverlay.AppCompat.ActionBar" | ||||||
|                 app:layout_constraintBottom_toTopOf="@+id/linearLayoutText" |  | ||||||
|             app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> |             app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | ||||||
|  |  | ||||||
|         <LinearLayout |         <LinearLayout | ||||||
| @ -70,23 +65,23 @@ | |||||||
|                 app:layout_constraintStart_toStartOf="parent" |                 app:layout_constraintStart_toStartOf="parent" | ||||||
|                 app:layout_constraintTop_toTopOf="parent" |                 app:layout_constraintTop_toTopOf="parent" | ||||||
|                 tools:text="@string/score" /> |                 tools:text="@string/score" /> | ||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|  |  | ||||||
|         <LinearLayout |         <LinearLayout | ||||||
|                 android:id="@+id/linearLayoutButtons" |  | ||||||
|             android:layout_width="match_parent" |             android:layout_width="match_parent" | ||||||
|             android:layout_height="match_parent" |             android:layout_height="match_parent" | ||||||
|                 android:layout_marginBottom="8dp" |             android:orientation="horizontal"> | ||||||
|                 android:layout_marginEnd="8dp" |  | ||||||
|                 android:layout_marginLeft="8dp" |             <ImageView | ||||||
|                 android:layout_marginRight="8dp" |                 android:id="@+id/imgLeftService" | ||||||
|                 android:layout_marginStart="8dp" |                 android:layout_width="48dp" | ||||||
|                 android:layout_marginTop="8dp" |                 android:layout_height="match_parent" | ||||||
|                 android:orientation="horizontal" |                 android:layout_margin="8dp" | ||||||
|                 app:layout_constraintBottom_toBottomOf="parent" |                 android:layout_weight="0" | ||||||
|                 app:layout_constraintEnd_toEndOf="parent" |                 android:contentDescription="@string/service_img_description" | ||||||
|                 app:layout_constraintStart_toStartOf="parent" |                 app:srcCompat="@drawable/ic_left_service" | ||||||
|                 app:layout_constraintTop_toBottomOf="@+id/linearLayoutText"> |                 tools:layout_editor_absoluteY="120dp" /> | ||||||
|  |  | ||||||
|             <Button |             <Button | ||||||
|                 android:id="@+id/buttonLeftPlayer" |                 android:id="@+id/buttonLeftPlayer" | ||||||
| @ -94,25 +89,20 @@ | |||||||
|                 android:layout_width="match_parent" |                 android:layout_width="match_parent" | ||||||
|                 android:layout_height="match_parent" |                 android:layout_height="match_parent" | ||||||
|                 android:layout_marginBottom="8dp" |                 android:layout_marginBottom="8dp" | ||||||
|                     android:layout_marginEnd="8dp" |  | ||||||
|                 android:layout_marginLeft="8dp" |                 android:layout_marginLeft="8dp" | ||||||
|                     android:layout_marginRight="8dp" |  | ||||||
|                 android:layout_marginStart="8dp" |                 android:layout_marginStart="8dp" | ||||||
|                 android:layout_marginTop="8dp" |                 android:layout_marginTop="8dp" | ||||||
|                 android:layout_weight="1" |                 android:layout_weight="1" | ||||||
|                 android:background="@color/colorAccent" |                 android:background="@color/colorAccent" | ||||||
|                 android:bufferType="spannable" |                 android:bufferType="spannable" | ||||||
|                     android:drawableLeft="@drawable/ic_left_service" |  | ||||||
|                 android:onClick="onClickLeftPlayer" |                 android:onClick="onClickLeftPlayer" | ||||||
|                 android:textAllCaps="false" |                 android:textAllCaps="false" | ||||||
|                 android:textAppearance="@style/TextAppearance.AppCompat.Button" |                 android:textAppearance="@style/TextAppearance.AppCompat.Button" | ||||||
|                 android:textSize="24sp" |                 android:textSize="24sp" | ||||||
|                 android:textStyle="bold" |                 android:textStyle="bold" | ||||||
|                     app:layout_constraintBottom_toTopOf="@+id/textScore" |                 app:layout_constraintBottom_toBottomOf="parent" | ||||||
|                     app:layout_constraintEnd_toStartOf="@+id/buttonRightPlayer" |                 app:layout_constraintStart_toEndOf="@+id/imgLeftService" | ||||||
|                     app:layout_constraintHorizontal_chainStyle="spread_inside" |                 app:layout_constraintTop_toTopOf="parent" | ||||||
|                     app:layout_constraintStart_toStartOf="parent" |  | ||||||
|                     app:layout_constraintTop_toBottomOf="@+id/textService" |  | ||||||
|                 tools:text="@string/button_text" /> |                 tools:text="@string/button_text" /> | ||||||
|  |  | ||||||
|             <Button |             <Button | ||||||
| @ -134,14 +124,22 @@ | |||||||
|                 android:textAppearance="@style/TextAppearance.AppCompat.Button" |                 android:textAppearance="@style/TextAppearance.AppCompat.Button" | ||||||
|                 android:textSize="24sp" |                 android:textSize="24sp" | ||||||
|                 android:textStyle="bold" |                 android:textStyle="bold" | ||||||
|                     app:layout_constraintBottom_toTopOf="@+id/textScore" |                 app:layout_constraintBottom_toBottomOf="parent" | ||||||
|                     app:layout_constraintEnd_toEndOf="parent" |                 app:layout_constraintEnd_toStartOf="@+id/imgRightService" | ||||||
|                 app:layout_constraintStart_toEndOf="@+id/buttonLeftPlayer" |                 app:layout_constraintStart_toEndOf="@+id/buttonLeftPlayer" | ||||||
|                     app:layout_constraintTop_toBottomOf="@+id/textService" |  | ||||||
|                 tools:text="@string/button_text" /> |                 tools:text="@string/button_text" /> | ||||||
|             </LinearLayout> |  | ||||||
|  |             <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" /> | ||||||
|  |  | ||||||
|         </LinearLayout> |         </LinearLayout> | ||||||
|  |  | ||||||
|     </FrameLayout> |     </LinearLayout> | ||||||
|  |  | ||||||
| </android.support.constraint.ConstraintLayout> | </android.support.constraint.ConstraintLayout> | ||||||
| @ -3,6 +3,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" | ||||||
|  |     android:focusableInTouchMode="true" | ||||||
|     tools:context=".NomsJoueursEtPremierServeurDialog"> |     tools:context=".NomsJoueursEtPremierServeurDialog"> | ||||||
|  |  | ||||||
|     <!-- TODO: Update blank fragment layout --> |     <!-- 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="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="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="about">À propos</string> | ||||||
|  |     <string name="service_img_description">Service</string> | ||||||
| </resources> | </resources> | ||||||
| @ -1,6 +1,6 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <resources> | <resources> | ||||||
|     <color name="colorPrimary">#016DF5</color> |     <color name="colorPrimary">#016df5</color> | ||||||
|     <color name="colorPrimaryDark">#004aa7</color> |     <color name="colorPrimaryDark">#004aa7</color> | ||||||
|     <color name="colorAccent">#0088FF</color> |     <color name="colorAccent">#0088FF</color> | ||||||
| </resources> | </resources> | ||||||
| @ -21,4 +21,5 @@ | |||||||
|     <string name="PingPointsCredits">Ping Points by Adrien Malingrey</string> |     <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="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="about">About</string> | ||||||
|  |     <string name="service_img_description">Service</string> | ||||||
| </resources> | </resources> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user