Skip to content

Commit 035f37c

Browse files
committed
Merge branch 'hotfix/patches' into develop
2 parents cd8bdb7 + 557206c commit 035f37c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

app/src/main/java/org/gnucash/android/ui/transaction/TransactionFormFragment.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
329329

330330
@Override
331331
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
332-
// Remove the favorite star from the view to avoid visual clutter.
333-
TextView qualifiedAccountName = (TextView) view;
334-
qualifiedAccountName.setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
332+
removeFavoriteIconFromSelectedView((TextView) view);
335333

336334
if (mSplitsList.size() == 2) { //when handling simple transfer to one account
337335
for (Split split : mSplitsList) {
@@ -348,6 +346,13 @@ public void onItemSelected(AdapterView<?> adapterView, View view, int position,
348346
startTransferFunds();
349347
}
350348

349+
// Removes the icon from view to avoid visual clutter
350+
private void removeFavoriteIconFromSelectedView(TextView view) {
351+
if (view != null) {
352+
view.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
353+
}
354+
}
355+
351356
@Override
352357
public void onNothingSelected(AdapterView<?> adapterView) {
353358
//nothing to see here, move along

0 commit comments

Comments
 (0)