Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavpandey committed Apr 11, 2018
1 parent 03a96ed commit a3bd008
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ public static class ViewHolder extends RecyclerView.ViewHolder {
public ViewHolder(@NonNull View view) {
super(view);

layout = view.findViewById(R.id.ads_permission_layout);
icon = view.findViewById(R.id.ads_permission_icon);
statusIcon = view.findViewById(R.id.ads_permission_status_icon);
title = view.findViewById(R.id.ads_permission_title);
subtitle = view.findViewById(R.id.ads_permission_subtitle);
info = view.findViewById(R.id.ads_permission_status_desc);
description = view.findViewById(R.id.ads_permission_description);
status = view.findViewById(R.id.ads_permission_status);
layout = view.findViewById(R.id.ads_info_layout);
icon = view.findViewById(R.id.ads_info_icon_big);
statusIcon = view.findViewById(R.id.ads_info_icon);
title = view.findViewById(R.id.ads_info_title);
subtitle = view.findViewById(R.id.ads_info_subtitle);
info = view.findViewById(R.id.ads_info_status_description);
description = view.findViewById(R.id.ads_info_description);
status = view.findViewById(R.id.ads_info_status);
}

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ public DynamicPermissionsAdapter(
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
return new ViewHolder(LayoutInflater.from(viewGroup.getContext())
.inflate(R.layout.ads_layout_row_permission, viewGroup, false));
.inflate(R.layout.ads_layout_info, viewGroup, false));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<com.pranavpandey.android.dynamic.support.widget.DynamicCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ads_permission_layout"
android:id="@+id/ads_info_layout"
style="@style/Widget.DynamicApp.Card.Clickable">

<LinearLayout
Expand All @@ -28,7 +28,7 @@
style="@style/Widget.DynamicApp.Content.Card">

<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
android:id="@+id/ads_permission_status_icon"
android:id="@+id/ads_info_icon"
android:layout_width="@dimen/ads_icon_avatar_card"
android:layout_height="@dimen/ads_icon_avatar_card"
android:layout_marginRight="@dimen/ads_icon_avatar_card_margin_end"
Expand All @@ -43,32 +43,32 @@
android:orientation="vertical">

<com.pranavpandey.android.dynamic.support.widget.DynamicTextView
android:id="@+id/ads_permission_title"
android:id="@+id/ads_info_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.DynamicApp.Title.Card" />

<com.pranavpandey.android.dynamic.support.widget.DynamicTextView
android:id="@+id/ads_permission_subtitle"
android:id="@+id/ads_info_subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.DynamicApp.Subtitle.Caps" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/ads_permission_status_desc"
android:id="@+id/ads_info_status_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.DynamicApp.Subtitle.Secondary" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/ads_permission_description"
android:id="@+id/ads_info_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/ads_margin_tiny"
style="@style/TextAppearance.DynamicApp.Description" />

<com.pranavpandey.android.dynamic.support.widget.DynamicTextView
android:id="@+id/ads_permission_status"
android:id="@+id/ads_info_status"
android:layout_marginTop="@dimen/ads_margin_regular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -87,7 +87,7 @@
android:layout_gravity="end|bottom">

<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
android:id="@+id/ads_permission_icon"
android:id="@+id/ads_info_icon_big"
android:layout_width="@dimen/ads_icon_card_permission"
android:layout_height="@dimen/ads_icon_card_permission"
style="@style/Widget.DynamicApp.Image.Card.Big" />
Expand Down

0 comments on commit a3bd008

Please sign in to comment.