It drives me crazy. I have made research for one day, although I tried everything, nothing work.
this is my xml code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/testo_tab_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#000000"
android:textSize="80dp"/>
</RelativeLayout>
My java's code is:
public class SocietaTabOne extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.societa_tab_one, container, false);
TextView titolo = (TextView)view.findViewById(R.id.testo_tab_one);
titolo.setText("wow");
return inflater.inflate(R.layout.societa_tab_one,null);
}
}
I should see the text in my fragment, but I don't see anything.
Why?