Click here to Skip to main content
15,886,258 members
Home / Discussions / Android
   

Android

 
QuestionConnect more than one android device by coding Pin
Member 117540029-Jun-15 10:42
Member 117540029-Jun-15 10:42 
SuggestionRe: Connect more than one android device by coding Pin
Richard MacCutchan9-Jun-15 21:12
mveRichard MacCutchan9-Jun-15 21:12 
Questionandroid parsing Pin
Member 117527499-Jun-15 1:26
Member 117527499-Jun-15 1:26 
AnswerRe: android parsing Pin
Richard MacCutchan9-Jun-15 3:42
mveRichard MacCutchan9-Jun-15 3:42 
QuestionRe: android parsing Pin
David Crow9-Jun-15 5:41
David Crow9-Jun-15 5:41 
QuestionAndroid Application in TAB HOST TabActivity can't Start Pin
Member 103287028-Jun-15 7:16
Member 103287028-Jun-15 7:16 
QuestionRe: Android Application in TAB HOST TabActivity can't Start Pin
David Crow8-Jun-15 9:17
David Crow8-Jun-15 9:17 
AnswerRe: Android Application in TAB HOST TabActivity can't Start Pin
Dadecki18-Jun-15 0:10
Dadecki18-Jun-15 0:10 
Hello,

I had similar problem.

Please see my example:

1) Xml file (note android.support.v4 is used):

<android.support.v4.app.FragmentTabHost
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TabWidget
            android:id="@android:id/tabs"
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"/>


        <FrameLayout
            android:id="@+id/realtabcontent"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"/>

    </LinearLayout>
</android.support.v4.app.FragmentTabHost>



2) Java file for Activity:


MainActivity extends FragmentActivity
implements YourFirstFragment.OnFragmentInteractionListener,  YourSecondFragment.OnFragmentInteractionListener

{
 private FragmentTabHost _yourTabHost;

  protected void onCreate(Bundle savedInstanceState) 
   {
    _yourTabHost =(FragmentTabHost)findViewById(android.R.id.tabhost);
    _yourTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);


_yourTabHost.addTab(_mTabHost.newTabSpec("first_fragment").setIndicator("NameOnTab"), YourFirstFragment.class, null);
        _yourTabHost.addTab(_mTabHost.newTabSpec("second_fragment").setIndicator("NameOnTab"), YourSecondFragment.class, null);
   }
}


Hope this will help somehow.
QuestionRegarding social media integrating Pin
Arpit Jain8-Jun-15 3:53
Arpit Jain8-Jun-15 3:53 
QuestionRe: Regarding social media integrating Pin
David Crow8-Jun-15 4:03
David Crow8-Jun-15 4:03 
AnswerRe: Regarding social media integrating Pin
Afzaal Ahmad Zeeshan8-Jun-15 4:33
professionalAfzaal Ahmad Zeeshan8-Jun-15 4:33 
GeneralRe: Regarding social media integrating Pin
Arpit Jain8-Jun-15 5:22
Arpit Jain8-Jun-15 5:22 
AnswerRe: Regarding social media integrating Pin
Afzaal Ahmad Zeeshan8-Jun-15 5:27
professionalAfzaal Ahmad Zeeshan8-Jun-15 5:27 
AnswerRe: Regarding social media integrating Pin
Dadecki17-Jun-15 22:26
Dadecki17-Jun-15 22:26 
QuestionAndroid database Pin
Member 117499218-Jun-15 2:02
Member 117499218-Jun-15 2:02 
SuggestionRe: Android database Pin
David Crow8-Jun-15 2:59
David Crow8-Jun-15 2:59 
AnswerRe: Android database Pin
Richard MacCutchan8-Jun-15 2:59
mveRichard MacCutchan8-Jun-15 2:59 
AnswerRe: Android database Pin
Member 117540029-Jun-15 10:35
Member 117540029-Jun-15 10:35 
GeneralRe: Android database Pin
Member 117499219-Jun-15 15:39
Member 117499219-Jun-15 15:39 
AnswerRe: Android database Pin
Dominic Burford11-Jun-15 18:38
professionalDominic Burford11-Jun-15 18:38 
QuestionAnimated ProgressBar in Xamarin Android in C# Pin
Tirumaleswara Reddy.K5-Jun-15 0:56
Tirumaleswara Reddy.K5-Jun-15 0:56 
AnswerRe: Animated ProgressBar in Xamarin Android in C# Pin
Richard MacCutchan5-Jun-15 2:37
mveRichard MacCutchan5-Jun-15 2:37 
QuestionSaving xml date in sql lite Pin
Member 117396203-Jun-15 9:11
Member 117396203-Jun-15 9:11 
AnswerRe: Saving xml date in sql lite Pin
Sascha Lefèvre3-Jun-15 9:38
professionalSascha Lefèvre3-Jun-15 9:38 
GeneralRe: Saving xml date in sql lite Pin
Member 117396203-Jun-15 18:59
Member 117396203-Jun-15 18:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.