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

Not able to add content xml #42

Open
rims07 opened this issue Dec 15, 2016 · 1 comment
Open

Not able to add content xml #42

rims07 opened this issue Dec 15, 2016 · 1 comment

Comments

@rims07
Copy link

rims07 commented Dec 15, 2016

Hello i implemented your library in my project. The problem i am facing is :
i am not able to attach the content layout in my file.. i did everything as required but still i am not able to see the textview which is in my content_xml.

Below is my code:
Activity:

public class OtherUserProfileActivity extends SlidingActivity {

    @Override
    public void init(Bundle savedInstanceState) {
        setTitle("Profile");
        setPrimaryColors(
                getResources().getColor(R.color.primary_dark),
                getResources().getColor(R.color.primary)
        );
        setContent(R.layout.other_user_content);
        setHeaderContent(R.layout.other_user_header_content);
        setFab(
                getResources().getColor(R.color.accent),
                R.drawable.fb_like_icon,
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Toast.makeText(OtherUserProfileActivity.this, "FAB Clicked", Toast.LENGTH_SHORT).show();
                    }
                }
        );

    }

    @Override
    protected void configureScroller(MultiShrinkScroller scroller) {
        super.configureScroller(scroller);
        scroller.setIntermediateHeaderHeightRatio(1);
    }
}

other_user_content

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:textColor="#ffffff"
    android:text="I think Sir you can avoid the error without turning off the Proguard. " />

other_user_header_content

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@string/app_name"
        android:scaleType="centerCrop"
        android:src="@drawable/background" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <com.appsfreax.bestinspirationalquotes.customImageView.widget.CircleImageView
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="15dp"
            android:layout_marginTop="15dp"
            android:src="@drawable/heart_on" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:text="My Profile"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="#ffffff" />

    </LinearLayout>
</FrameLayout>

Screenshot Attached:
screenshot_20161215-143757
screenshot_20161215-143802

@masoud-c
Copy link

I have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants