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
Don't understand how to attach fragment to activity #9
Comments
Hi, @mrdarpan This code I think no problem. Fragment is using the support version? |
activity_user_profile <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:font="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="10"
android:padding="@dimen/fragment_default_padding"
android:background="@color/color_light_gray"
android:visibility="visible">
<ImageView
android:id="@+id/profilePicture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:minWidth="100dp"
android:minHeight="100dp"
android:background="@color/color_dark_gray"
android:padding="2dp"
android:scaleType="fitXY" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/fragment_default_padding"
android:paddingRight="@dimen/fragment_default_padding"
android:orientation="vertical"
android:layout_weight="7">
<net.kianoni.fontloader.TextView
android:id="@+id/userName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="User Name"
android:textSize="18sp"
font:fontFile="fonts/Raleway-Bold.ttf" />
<net.kianoni.fontloader.TextView
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Profile: 10% Completed"
android:textSize="16sp"
font:fontFile="fonts/Raleway-Regular.ttf" />
</LinearLayout>
</LinearLayout>
<com.ogaclejapan.smarttablayout.SmartTabLayout
android:id="@+id/viewpagertab"
android:layout_width="match_parent"
android:layout_height="48dp"
app:stl_indicatorAlwaysInCenter="false"
app:stl_indicatorInFront="true"
app:stl_indicatorInterpolation="smart"
app:stl_indicatorColor="@color/color_dark_orange"
app:stl_indicatorThickness="4dp"
app:stl_indicatorCornerRadius="0dp"
app:stl_underlineColor="@color/color_dark_orange"
app:stl_underlineThickness="1dp"
app:stl_dividerColor="@color/color_dark_orange"
app:stl_dividerThickness="1dp"
app:stl_defaultTabTextAllCaps="true"
app:stl_defaultTabTextColor="#FC000000"
app:stl_defaultTabTextSize="12sp"
app:stl_defaultTabTextHorizontalPadding="16dp"
app:stl_defaultTabTextMinWidth="0dp"
app:stl_distributeEvenly="true"/>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/viewpagertab" />
</LinearLayout>
</ScrollView>
</LinearLayout> |
Hi, @mrdarpan <ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
...
</ScrollView>
The problem is not associated with this library... :o |
Hi ogaclejapan.
|
I am facing same issue @NhenDen Did you got any soluction? |
I am using this in my activity but activity only shows the tabs but no fragment content...
Activity Class:
Fragment Class:
The text was updated successfully, but these errors were encountered: