Trying to put a header in a ListFragment like this
@Override
public View onCreateView(org.holoeverywhere.LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View listRoot = inflater.inflate(R.layout.list, null);
headerView = inflater.inflate(R.layout.header);
return listRoot;
}
In onActivityCreated
@Override
public void onActivityCreated(Bundle savedInstanceS
I have a fairly simple DialogFragment.
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
// Save UI state changes to the savedInstanceState.
// This bundle will be passed to onCreate if the process is
// killed and restarted.
savedInstanceState.putLong("lastSend", lastSent);
//more variables stored
}
/** Called when the activity is first created.
I have a following Fragment:
public class FragmentSocial extends Fragment implements ActionBar.TabListener, OnClickListener
{
private Fragment mFragment;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActivity().setContentView(R.layout.fragment_social);
}
public void onTabSelected(Tab tab, FragmentTransaction ft) {
// relevant co
I have two activities:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void click(View view) {
Intent intent= new Intent(this, TranslucentActivity.class);
startActivity(intent);
}
}
public class TranslucentActivity extends Activity
i am writing one activity class like below
public class HeaderFooter extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.headerfooter);
}
}
and i am extending one more class from HeaderFooter class
public class Home extends HeaderFooter
{
@Override
public voi
I have a dialog fragment using a custom layout with a quite complex View hierarchy.
I am trying to add a ListView onto a Fragment, not just a ListFragment. I want the tabs on top than in the Fragment a ListView.
I have a fragment that acquires the GPS signal and sends the result to a custom view.
I can display the output from the signal acquired in the fragment and see that it updates just fine.