Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to change to a new activity from a button click inside a fragmenttab
    primarykey
    data
    text
    <p>Hi i'm working on a app that has swipe tabs inside the tabs there is buttons so for example fragmenttab1 has Algabra button i want it when the user clicks this button it takes them to AlgabraHome.class i have no idea how to do this any help would be amazing!</p> <p>fragmanttab1.xml:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;Button android:id="@+id/algabra" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="56dp" android:text="Algabra" /&gt; &lt;Button android:id="@+id/geomtery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="@+id/algabra" android:layout_below="@+id/algabra" android:layout_marginTop="75dp" android:text="geomtery" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>FragmentTab1.java</p> <pre><code>package com.androidbegin.absviewpagertutorial; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.actionbarsherlock.app.SherlockFragment; public class FragmentTab1 extends SherlockFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Get the view from fragmenttab1.xml View view = inflater.inflate(R.layout.fragmenttab1, container, false); return view; } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); setUserVisibleHint(true); } } </code></pre> <p>if you need anything else please let me know </p> <p>i'm new to android development and am learning so no non helpful comments please :)</p> <p>Thanks </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload