Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Get the instance of my TabSpec

Get the instance of my TabSpec

Put your problem here if it does not fit any of the other categories.

Get the instance of my TabSpec

Postby clemich » Wed Mar 02, 2011 9:47 am

Hi, I'm getting trouble. I have to use one method of the instance of secondTabSpec. I don't know how use it...


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void onCreate(Bundle savedInstanceState) {
  2.                 super.onCreate(savedInstanceState);
  3.                 Log.v("", "Welcome in Main");
  4.                 setContentView(R.layout.tab);
  5.                
  6.                 // pour le Listener de swipe
  7.                 mLibrary = GestureLibraries.fromRawResource(this, R.raw.actions);
  8.                 if (!mLibrary.load()) {
  9.                 finish();}
  10.                 GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
  11.         //R.id.gestures c'est l'id dans le xml
  12.                 gestures.addOnGesturePerformedListener(this);
  13.  
  14.  
  15.                 TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);  // Le TabHost a des Tabs
  16.                 TabSpec firstTabSpec = tabHost.newTabSpec("tid1");      // TabSpec: new tab - TabSpec : setContent to the tab
  17.                 TabSpec secondTabSpec = tabHost.newTabSpec("tid1");
  18.                 TabSpec thirdTabSpec = tabHost.newTabSpec("tid1");      // tid1 is firstTabSpec Id (used to access outside)
  19.                 // Dans un TabHost, y'a 3 TabSpec
  20.                
  21.                 /** TabSpec setIndicator() indique le nom et les param -- TabSpec setContent() règle le contenu d'une tab */
  22.                 firstTabSpec.setIndicator("Informations", getResources().getDrawable(R.drawable.database)).setContent(new Intent(this,FirstTab.class));
  23.                 secondTabSpec.setIndicator("Graphiques", getResources().getDrawable(R.drawable.chart)).setContent(new Intent(this,SecondTab.class));
  24.                 thirdTabSpec.setIndicator("Réglages", getResources().getDrawable(R.drawable.settings)).setContent(new Intent(this,ThirdTab.class));
  25.                 // On déclare un Intent qui sera utilisé pour lancer les activités enfants
  26.  
  27.                 /** Ajout des tabSpec sur le TabHost to display. */
  28.                 tabHost.addTab(firstTabSpec);
  29.                 tabHost.addTab(secondTabSpec);
  30.                 tabHost.addTab(thirdTabSpec);
  31.                 // On ajoute les TabSpec au TabHost
  32.         }
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


Thank you
clemich
Freshman
Freshman
 
Posts: 6
Joined: Wed Feb 23, 2011 5:32 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests