File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
java/com/d4rk/androidtutorials/java/ui/screens/home/repository Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,13 @@ public void fetchPromotedApps(PromotedAppsCallback callback) {
8787 JSONArray apps = response .getJSONObject ("data" ).getJSONArray ("apps" );
8888 for (int i = 0 ; i < apps .length (); i ++) {
8989 JSONObject obj = apps .getJSONObject (i );
90+ String pkg = obj .getString ("packageName" );
91+ if (BuildConfig .APPLICATION_ID .equals (pkg )) {
92+ continue ;
93+ }
9094 result .add (new PromotedApp (
9195 obj .getString ("name" ),
92- obj . getString ( "packageName" ) ,
96+ pkg ,
9397 obj .getString ("iconLogo" )
9498 ));
9599 }
Original file line number Diff line number Diff line change 33 xmlns : app =" http://schemas.android.com/apk/res-auto"
44 style =" @style/Widget.Material3.CardView.Elevated"
55 android : layout_width =" 160dp"
6- android : layout_height =" wrap_content "
6+ android : layout_height =" 180dp "
77 android : layout_marginEnd =" 8dp" >
88
99 <androidx .appcompat.widget.LinearLayoutCompat
2525 android : layout_width =" match_parent"
2626 android : layout_height =" wrap_content"
2727 android : layout_marginTop =" 8dp"
28+ android : maxLines =" 2"
29+ android : ellipsize =" end"
2830 android : text =" App"
2931 android : textAppearance =" @style/TextAppearance.Material3.BodyMedium" />
3032
You can’t perform that action at this time.
0 commit comments