Skip to content

Commit

Permalink
Merge pull request #32 from furkanaskin/dev
Browse files Browse the repository at this point in the history
Fix release app crashes
  • Loading branch information
nuhkoca authored Jul 24, 2021
2 parents a4c30d4 + 1bd33c2 commit 100ff19
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}

- name: Assemble Debug App
run: ./gradlew clean assembleDebug
- name: Assemble Release App
run: ./gradlew clean assembleRelease

- name: Release a new version
uses: softprops/action-gh-release@v1
with:
files: app/build/outputs/apk/debug/*.apk
files: app/build/outputs/apk/release/*.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ android {
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testCoverageEnabled false

signingConfig signingConfigs.debug
}
debug {
ext.enableCrashlytics = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import com.faskn.app.weatherapp.domain.model.ListItem
* Created by Furkan on 2019-10-25
*/

class ForecastAdapter(private val callBack: (ListItem, View, View, View, View, View) -> Unit) : BaseAdapter<ListItem>(
diffCallback
) {
class ForecastAdapter(
private val callBack: (ListItem, View, View, View, View, View) -> Unit
) : BaseAdapter<ListItem>(diffCallback) {

override fun createBinding(parent: ViewGroup, viewType: Int): ViewDataBinding {
val mBinding = ItemForecastBinding.inflate(
Expand All @@ -26,15 +26,15 @@ class ForecastAdapter(private val callBack: (ListItem, View, View, View, View, V
val viewModel = ForecastItemViewModel()
mBinding.viewModel = viewModel

mBinding.rootView.setOnClickListener {
mBinding.cardView.setOnClickListener {
mBinding.viewModel?.item?.get()?.let { /*
ViewCompat.setTransitionName(mBinding.cardView, mBinding.rootView.resources.getString(R.string.cardView, it.getDay()))
ViewCompat.setTransitionName(mBinding.imageViewForecastIcon, mBinding.rootView.resources.getString(R.string.forecastIcon, it.getDay()))
ViewCompat.setTransitionName(mBinding.textViewDayOfWeek, mBinding.rootView.resources.getString(R.string.dayOfWeek, it.getDay()))
ViewCompat.setTransitionName(mBinding.textViewTemp, mBinding.rootView.resources.getString(R.string.temp, it.getDay()))
ViewCompat.setTransitionName(mBinding.linearLayoutTempMaxMin, mBinding.rootView.resources.getString(R.string.tempMaxMin, it.getDay()))*/

callBack.invoke(
callBack(
it,
mBinding.cardView,
mBinding.imageViewForecastIcon,
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/res/layout/fragment_github_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,21 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textViewAboutApp"
android:layout_alignStart="@id/textViewAboutApp"
android:layout_alignEnd="@id/textViewAboutApp"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="?attr/selectableItemBackground"
android:gravity="center"
android:orientation="horizontal">

<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:src="@drawable/ic_github" />
android:src="@drawable/ic_github"
tools:ignore="ContentDescription" />

<TextView
android:layout_width="wrap_content"
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/layout/fragment_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

</data>


<RelativeLayout
android:id="@+id/rootView"
android:layout_width="match_parent"
Expand All @@ -41,7 +40,6 @@

</com.google.android.material.card.MaterialCardView>


<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -78,13 +76,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:drawableEnd="@android:drawable/stat_notify_error"
android:paddingStart="12dp"
android:paddingTop="12dp"
android:paddingEnd="24dp"
android:paddingBottom="12dp"
android:textColor="@android:color/white"
android:textStyle="bold"
app:drawableEndCompat="@android:drawable/stat_notify_error"
app:setErrorText="@{viewState}"
tools:text="Status code : 500 Internal server error!" />

Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/item_forecast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="40dp"
android:transitionName="@{String.format(@string/cardView, viewModel.item.getDay())}"
android:backgroundTint="@{viewModel.item.getColor()}"
android:clickable="true"
android:focusable="true"
android:transitionName="@{String.format(@string/cardView, viewModel.item.getDay())}"
app:cardCornerRadius="24dp"
tools:backgroundTint="@android:color/holo_orange_dark">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">


<ImageView
android:layout_width="170dp"
android:layout_height="124dp"
Expand All @@ -62,7 +63,6 @@
android:layout_marginEnd="-40dp"
android:src="@drawable/ic_splash_big_cloud" />


<TextView
android:id="@+id/textViewTimeOfDay"
android:layout_width="wrap_content"
Expand All @@ -86,8 +86,8 @@
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Monday"
android:transitionName="@{String.format(@string/dayOfWeek, viewModel.item.getDay())}" />
android:transitionName="@{String.format(@string/dayOfWeek, viewModel.item.getDay())}"
tools:text="Monday" />

<ImageView
android:id="@+id/imageViewForecastIcon"
Expand All @@ -96,9 +96,9 @@
android:layout_below="@id/textViewDayOfWeek"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:transitionName="@{String.format(@string/forecastIcon, viewModel.item.getDay())}"
app:setWeatherIcon="@{viewModel.item.getWeatherItem().icon}"
tools:src="@drawable/ic_splash_big_cloud"
android:transitionName="@{String.format(@string/forecastIcon, viewModel.item.getDay())}"/>
tools:src="@drawable/ic_splash_big_cloud" />

<TextView
android:id="@+id/textViewTemp"
Expand All @@ -111,8 +111,8 @@
android:textColor="@color/white"
android:textSize="26sp"
android:textStyle="bold"
tools:text="23°"
android:transitionName="@{String.format(@string/temp, viewModel.item.getDay())}"/>
android:transitionName="@{String.format(@string/temp, viewModel.item.getDay())}"
tools:text="23°" />

<LinearLayout
android:id="@+id/linearLayoutTempMaxMin"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/raw/keep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/*_svg" />

0 comments on commit 100ff19

Please sign in to comment.