Skip to content

Commit

Permalink
crash issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
imac committed Jul 8, 2024
1 parent 17c6de2 commit 5b6ffa0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
minSdkVersion 21
targetSdkVersion 34
versionCode 60
versionName "2024.03.25"
versionName "2024.03.26"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ protected void onCreate(Bundle savedInstanceState) {

viewedAnnouncement(getAnnouncementDetailResponse.getId());

binding.viewLayout.setBackgroundColor(Color.parseColor(OFHelper.handlerColor(getAnnouncementDetailResponse.getCategory().getColor())));
String catColor = "#5D5FEF";
if(getAnnouncementDetailResponse.getCategory() != null){
catColor = getAnnouncementDetailResponse.getCategory().getColor();
}

binding.viewLayout.setBackgroundColor(Color.parseColor(OFHelper.handlerColor(catColor)));

text = getAnnouncementDetailResponse.getTitle();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ protected void onCreate(Bundle savedInstanceState) {

viewedAnnouncement(getAnnouncementDetailResponse.getId());

binding.viewLayout.setBackgroundColor(Color.parseColor(OFHelper.handlerColor(getAnnouncementDetailResponse.getCategory().getColor())));
String catColor = "#5D5FEF";
if(getAnnouncementDetailResponse.getCategory() != null){
catColor = getAnnouncementDetailResponse.getCategory().getColor();
}

binding.viewLayout.setBackgroundColor(Color.parseColor(OFHelper.handlerColor(catColor)));

text = getAnnouncementDetailResponse.getTitle();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,17 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,

binding.tvTitle.setText(getAnnouncementDetailResponse.getTitle());

int colorTitle = OFHelper.manipulateColor(Color.parseColor(OFHelper.handlerColor(getAnnouncementDetailResponse.getCategory().getColor())), 1.0f);
String catColor = "#5D5FEF";
String catName = "New";
if(getAnnouncementDetailResponse.getCategory() != null){
catName = getAnnouncementDetailResponse.getCategory().getName();
catColor = getAnnouncementDetailResponse.getCategory().getColor();
}

int colorTitle = OFHelper.manipulateColor(Color.parseColor(OFHelper.handlerColor(catColor)), 1.0f);
binding.tvCategoryName.setTextColor(colorTitle);
binding.tvCategoryName.setText(getAnnouncementDetailResponse.getCategory().getName());
binding.tvCategoryName.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(OFHelper.getAlphaHexColor(getAnnouncementDetailResponse.getCategory().getColor(),51))));
binding.tvCategoryName.setText(catName);
binding.tvCategoryName.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(OFHelper.getAlphaHexColor(catColor,51))));

binding.tvDate.setText(OFHelper.formatedDate(getAnnouncementDetailResponse.getPublishedAt(),"MMM dd, yyyy"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public interface OFConstants {

String currentVersion = "2024.03.25";//2023.07.14;
String currentVersion = "2024.03.26";//2023.07.14;
String MODE = "prod";//"dev";//"beta";//

String PLATFORM = "Android";
Expand Down

0 comments on commit 5b6ffa0

Please sign in to comment.