Skip to content

Commit 100ff19

Browse files
authored
Merge pull request #32 from furkanaskin/dev
Fix release app crashes
2 parents a4c30d4 + 1bd33c2 commit 100ff19

7 files changed

Lines changed: 29 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
~/.gradle/wrapper
3333
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}
3434

35-
- name: Assemble Debug App
36-
run: ./gradlew clean assembleDebug
35+
- name: Assemble Release App
36+
run: ./gradlew clean assembleRelease
3737

3838
- name: Release a new version
3939
uses: softprops/action-gh-release@v1
4040
with:
41-
files: app/build/outputs/apk/debug/*.apk
41+
files: app/build/outputs/apk/release/*.apk
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ android {
5050
debuggable false
5151
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
5252
testCoverageEnabled false
53+
54+
signingConfig signingConfigs.debug
5355
}
5456
debug {
5557
ext.enableCrashlytics = false

app/src/main/java/com/faskn/app/weatherapp/ui/dashboard/forecast/ForecastAdapter.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import com.faskn.app.weatherapp.domain.model.ListItem
1313
* Created by Furkan on 2019-10-25
1414
*/
1515

16-
class ForecastAdapter(private val callBack: (ListItem, View, View, View, View, View) -> Unit) : BaseAdapter<ListItem>(
17-
diffCallback
18-
) {
16+
class ForecastAdapter(
17+
private val callBack: (ListItem, View, View, View, View, View) -> Unit
18+
) : BaseAdapter<ListItem>(diffCallback) {
1919

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

29-
mBinding.rootView.setOnClickListener {
29+
mBinding.cardView.setOnClickListener {
3030
mBinding.viewModel?.item?.get()?.let { /*
3131
ViewCompat.setTransitionName(mBinding.cardView, mBinding.rootView.resources.getString(R.string.cardView, it.getDay()))
3232
ViewCompat.setTransitionName(mBinding.imageViewForecastIcon, mBinding.rootView.resources.getString(R.string.forecastIcon, it.getDay()))
3333
ViewCompat.setTransitionName(mBinding.textViewDayOfWeek, mBinding.rootView.resources.getString(R.string.dayOfWeek, it.getDay()))
3434
ViewCompat.setTransitionName(mBinding.textViewTemp, mBinding.rootView.resources.getString(R.string.temp, it.getDay()))
3535
ViewCompat.setTransitionName(mBinding.linearLayoutTempMaxMin, mBinding.rootView.resources.getString(R.string.tempMaxMin, it.getDay()))*/
3636

37-
callBack.invoke(
37+
callBack(
3838
it,
3939
mBinding.cardView,
4040
mBinding.imageViewForecastIcon,

app/src/main/res/layout/fragment_github_dialog.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,21 @@
4444
android:layout_width="wrap_content"
4545
android:layout_height="wrap_content"
4646
android:layout_below="@id/textViewAboutApp"
47+
android:layout_alignStart="@id/textViewAboutApp"
48+
android:layout_alignEnd="@id/textViewAboutApp"
4749
android:layout_centerHorizontal="true"
4850
android:layout_marginTop="12dp"
4951
android:layout_marginBottom="12dp"
52+
android:background="?attr/selectableItemBackground"
53+
android:gravity="center"
5054
android:orientation="horizontal">
5155

5256
<ImageView
5357
android:layout_width="32dp"
5458
android:layout_height="32dp"
5559
android:layout_gravity="center"
56-
android:src="@drawable/ic_github" />
60+
android:src="@drawable/ic_github"
61+
tools:ignore="ContentDescription" />
5762

5863
<TextView
5964
android:layout_width="wrap_content"

app/src/main/res/layout/fragment_search.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
</data>
1717

18-
1918
<RelativeLayout
2019
android:id="@+id/rootView"
2120
android:layout_width="match_parent"
@@ -41,7 +40,6 @@
4140

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

44-
4543
<RelativeLayout
4644
android:layout_width="match_parent"
4745
android:layout_height="match_parent"
@@ -78,13 +76,13 @@
7876
android:layout_width="match_parent"
7977
android:layout_height="wrap_content"
8078
android:background="@android:color/transparent"
81-
android:drawableEnd="@android:drawable/stat_notify_error"
8279
android:paddingStart="12dp"
8380
android:paddingTop="12dp"
8481
android:paddingEnd="24dp"
8582
android:paddingBottom="12dp"
8683
android:textColor="@android:color/white"
8784
android:textStyle="bold"
85+
app:drawableEndCompat="@android:drawable/stat_notify_error"
8886
app:setErrorText="@{viewState}"
8987
tools:text="Status code : 500 Internal server error!" />
9088

app/src/main/res/layout/item_forecast.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@
4444
android:layout_marginTop="8dp"
4545
android:layout_marginEnd="8dp"
4646
android:layout_marginBottom="40dp"
47-
android:transitionName="@{String.format(@string/cardView, viewModel.item.getDay())}"
4847
android:backgroundTint="@{viewModel.item.getColor()}"
48+
android:clickable="true"
49+
android:focusable="true"
50+
android:transitionName="@{String.format(@string/cardView, viewModel.item.getDay())}"
4951
app:cardCornerRadius="24dp"
5052
tools:backgroundTint="@android:color/holo_orange_dark">
5153

5254
<RelativeLayout
5355
android:layout_width="match_parent"
5456
android:layout_height="wrap_content">
5557

56-
5758
<ImageView
5859
android:layout_width="170dp"
5960
android:layout_height="124dp"
@@ -62,7 +63,6 @@
6263
android:layout_marginEnd="-40dp"
6364
android:src="@drawable/ic_splash_big_cloud" />
6465

65-
6666
<TextView
6767
android:id="@+id/textViewTimeOfDay"
6868
android:layout_width="wrap_content"
@@ -86,8 +86,8 @@
8686
android:textColor="@color/white"
8787
android:textSize="14sp"
8888
android:textStyle="bold"
89-
tools:text="Monday"
90-
android:transitionName="@{String.format(@string/dayOfWeek, viewModel.item.getDay())}" />
89+
android:transitionName="@{String.format(@string/dayOfWeek, viewModel.item.getDay())}"
90+
tools:text="Monday" />
9191

9292
<ImageView
9393
android:id="@+id/imageViewForecastIcon"
@@ -96,9 +96,9 @@
9696
android:layout_below="@id/textViewDayOfWeek"
9797
android:layout_centerHorizontal="true"
9898
android:layout_marginTop="12dp"
99+
android:transitionName="@{String.format(@string/forecastIcon, viewModel.item.getDay())}"
99100
app:setWeatherIcon="@{viewModel.item.getWeatherItem().icon}"
100-
tools:src="@drawable/ic_splash_big_cloud"
101-
android:transitionName="@{String.format(@string/forecastIcon, viewModel.item.getDay())}"/>
101+
tools:src="@drawable/ic_splash_big_cloud" />
102102

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

117117
<LinearLayout
118118
android:id="@+id/linearLayoutTempMaxMin"

app/src/main/res/raw/keep.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:tools="http://schemas.android.com/tools"
3+
tools:keep="@drawable/*_svg" />

0 commit comments

Comments
 (0)