• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

table and rss problem

VagosM

Lurker
Feb 9, 2014
2
0
Hello i am new in forum and in android developing aplications , i have an idea in java but is the first time i make a program in android.
I have a big problem i find an rss code and put it in my aplication but is not work , i think is a problem with frame work and tabs.
In aplication a ihave 6 tabs with different works in two of them i want to make an rss for two different sites.
i belive the probleme is in frame works , the code is
MainActivity i have the code for tabs
[HIGH]public class MainActivity extends TabActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

TabHost tabHost = getTabHost();

// Tab
TabSpec Sspec = tabHost.newTabSpec("Shoopinp");
Sspec.setIndicator("Shopping");
Intent SIntent = new Intent(this, Shopping.class);
Sspec.setContent(SIntent);
// other tabs

// Adding all TabSpec to TabHost
tabHost.addTab(Sspec); // Adding tab[/HIGH]

the shopping
[HIGH]package com.example.project;



import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

public class Shopping extends FragmentActivity {


public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sho_layout);

if (savedInstanceState == null) {
addRssFragment();
}
}

private void addRssFragment() {
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
RssFragment fragment = new RssFragment();
transaction.add(R.id.fragment_container, fragment);
transaction.commit();
}

@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean("fragment_added", true);
}
}[/HIGH]
and the other is form a project i find in net and change for xml tag in my site tags from heare i see the code
androidresearch.wordpress.com
The main activity of this app i put the code in my shopping class and the other xml and java clas i put the same but change only the xml tangs and the site witch take it the rrs.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones