Skip to content

Commit

Permalink
update layout show bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HotBitmapGG committed Jul 4, 2017
1 parent c1a372c commit cc331b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.RelativeLayout;

import com.hotbitmapgg.bilibili.adapter.AttentionDynamicAdapter;
import com.hotbitmapgg.bilibili.base.RxLazyFragment;
Expand Down Expand Up @@ -34,6 +35,8 @@ public class HomeAttentionFragment extends RxLazyFragment {
RecyclerView mRecyclerView;
@BindView(R.id.empty_layout)
CustomEmptyView mCustomEmptyView;
@BindView(R.id.layout_top)
RelativeLayout topLayout;

private boolean mIsRefreshing = false;
private List<AttentionDynamicInfo.DataBean.FeedsBean> dynamics = new ArrayList<>();
Expand Down Expand Up @@ -110,6 +113,7 @@ protected void initRecyclerView() {


public void initEmptyView() {
topLayout.setVisibility(View.GONE);
mSwipeRefreshLayout.setRefreshing(false);
mCustomEmptyView.setVisibility(View.VISIBLE);
mRecyclerView.setVisibility(View.GONE);
Expand All @@ -119,6 +123,7 @@ public void initEmptyView() {
}

public void hideEmptyView() {
topLayout.setVisibility(View.VISIBLE);
mCustomEmptyView.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/fragment_attention.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
android:orientation="vertical">

<RelativeLayout
android:id="@+id/layout_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/default_tiny_padding"
android:layout_marginStart="@dimen/default_tiny_padding">
android:layout_marginStart="@dimen/default_tiny_padding"
android:visibility="gone">


<LinearLayout
Expand Down

0 comments on commit cc331b8

Please sign in to comment.