From ad034b04093da8cb5111e7e8a82b94ba97ff490f Mon Sep 17 00:00:00 2001 From: somenath sarkar Date: Tue, 18 Jun 2019 01:42:05 +0530 Subject: [PATCH 1/2] Encoded Bitmap --- app/src/main/java/com/example/saar/Team/TeamFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/saar/Team/TeamFragment.java b/app/src/main/java/com/example/saar/Team/TeamFragment.java index ffa7c59..fa1edb3 100644 --- a/app/src/main/java/com/example/saar/Team/TeamFragment.java +++ b/app/src/main/java/com/example/saar/Team/TeamFragment.java @@ -39,7 +39,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, for (int position = 0; position < IMAGE_ID.length; position++) { CircleImageView circleImageView = rootView.findViewById(IMAGE_VIEW_ID[position]); - circleImageView.setImageResource(IMAGE_ID[position]); + //circleImageView.setImageResource(IMAGE_ID[position]); + circleImageView.setImageBitmap(decodeSampledBitmapFromResource(getResources(), IMAGE_ID[position], 70, 70)); } From d1a7168f737f0ea08eafebcd17c48756099f69e8 Mon Sep 17 00:00:00 2001 From: somenath sarkar Date: Wed, 19 Jun 2019 00:23:06 +0530 Subject: [PATCH 2/2] Improved Homepage and nav header --- app/src/main/java/com/example/saar/Home/HomeFragment.java | 5 ++++- app/src/main/java/com/example/saar/MainActivity.java | 1 + app/src/main/res/layout/fragment_home.xml | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/saar/Home/HomeFragment.java b/app/src/main/java/com/example/saar/Home/HomeFragment.java index cda04d8..83cabab 100644 --- a/app/src/main/java/com/example/saar/Home/HomeFragment.java +++ b/app/src/main/java/com/example/saar/Home/HomeFragment.java @@ -25,7 +25,10 @@ public class HomeFragment extends Fragment implements View.OnClickListener { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_home, container, false); + View rootView = inflater.inflate(R.layout.fragment_home, container, false); + rootView.findViewById(R.id.homepage_abhinav_civ).setLayerType(View.LAYER_TYPE_SOFTWARE, null); + rootView.findViewById(R.id.homepage_vivek_civ).setLayerType(View.LAYER_TYPE_SOFTWARE, null); + return rootView; } @Override diff --git a/app/src/main/java/com/example/saar/MainActivity.java b/app/src/main/java/com/example/saar/MainActivity.java index 8fd50d2..039f817 100644 --- a/app/src/main/java/com/example/saar/MainActivity.java +++ b/app/src/main/java/com/example/saar/MainActivity.java @@ -84,6 +84,7 @@ protected void onCreate(Bundle savedInstanceState) { LinearLayout header = (LinearLayout) headerview.findViewById(R.id.nav_layout); name = headerview.findViewById(R.id.nav_header_name); email = headerview.findViewById(R.id.nav_header_email); + header.setLayerType(View.LAYER_TYPE_SOFTWARE, null); circleImageView = headerview.findViewById(R.id.nav_header_image); setHeaderData(); header.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 70c2d51..0216c90 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -115,7 +115,8 @@ android:layout_width="@dimen/no_margin" android:layout_height="match_parent" android:layout_weight="1" - android:gravity="center"> + android:gravity="center" + android:id="@+id/homepage_abhinav_civ"> + android:gravity="center" + android:id="@+id/homepage_vivek_civ">