Skip to content

Commit

Permalink
Merge pull request #11 from CraveFood/fix-id-conflits
Browse files Browse the repository at this point in the history
Renamed all resources files to avoid IDs conflicts
  • Loading branch information
rafael1mc authored Mar 12, 2019
2 parents 000ee6d + ebef0f0 commit 6d2d275
Show file tree
Hide file tree
Showing 31 changed files with 127 additions and 147 deletions.
4 changes: 1 addition & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
Expand Down Expand Up @@ -32,4 +30,4 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation project(':cravecalculator')
}
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="@string/c_calc_app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
Expand Down
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.21'
repositories {
Expand All @@ -8,10 +6,8 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

Expand All @@ -25,4 +21,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
8 changes: 0 additions & 8 deletions cravecalculator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,23 @@ apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28



defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import kotlinx.android.synthetic.main.calculator_fragment.*
import kotlinx.android.synthetic.main.c_calc_fragment.*


class CalculatorFragment : Fragment() {
Expand All @@ -19,7 +19,7 @@ class CalculatorFragment : Fragment() {
private var onConfirmListener: ((Double) -> Unit)? = null

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.calculator_fragment, container, false)
return inflater.inflate(R.layout.c_calc_fragment, container, false)
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:id="@android:id/mask"
android:drawable="@drawable/shape_cancel_button"/>
android:drawable="@drawable/c_calc_shape_cancel_button"/>
</ripple>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:drawable="@drawable/shape_confirm_button"/>
<item android:drawable="@drawable/c_calc_shape_confirm_button"/>
</ripple>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/cCalColorRippleButton">
<item android:drawable="@drawable/c_calc_shape_equal_button"/>
</ripple>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:id="@android:id/mask"
android:drawable="@drawable/shape_numbers_button"/>
android:drawable="@drawable/c_calc_shape_numbers_button"/>
</ripple>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/cCalColorRippleButton">
<item android:drawable="@drawable/c_calc_shape_operations_button"/>
</ripple>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/shape_confirm_button_disabled"/>
<item android:drawable="@drawable/ripple_confirm_button"/>
<item android:state_enabled="false" android:drawable="@drawable/c_calc_shape_confirm_button_disabled"/>
<item android:drawable="@drawable/c_calc_ripple_confirm_button"/>
</selector>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorCancelButtonBackground"/>
<solid android:color="@color/cCalColorCancelButtonBackground"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorConfirmButtonBackground"/>
<solid android:color="@color/cCalColorConfirmButtonBackground"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorDisabled"/>
<solid android:color="@color/cCalColorDisabled"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorNumbersButtonBackground"/>
<solid android:color="@color/cCalColorEqualButtonBackground"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorOperationsButtonBackground"/>
<solid android:color="@color/cCalColorNumbersButtonBackground"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorEqualButtonBackground"/>
<solid android:color="@color/cCalColorOperationsButtonBackground"/>
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
Expand Down
5 changes: 0 additions & 5 deletions cravecalculator/src/main/res/drawable/ripple_equal_button.xml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6d2d275

Please sign in to comment.