Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: CircleImageView issue #231

Merged
merged 2 commits into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/src/main/java/com/example/saar/Home/HomeFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/example/saar/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/example/saar/Team/TeamFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}


Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="@dimen/circular_image_dimension"
Expand All @@ -127,7 +128,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_vivek_civ">

<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="@dimen/circular_image_dimension"
Expand Down