when i click to recyclarview iteam it should hide from my recyclarview - mysql

I want to make that people visit my website one time one site per person.
i am using mysql database for my data base .
i want to make when the user click on the visit button the he will redirect to the site (i had configured).
and that persion not able to go same site again. the button should show visited and its should be disable or hide form recyclar view (How to do,I want this).
My adapter class:
public class MyAdapter extends RecyclerView.Adapter<ImageViewHOlder> {
private Context context;
private List<ModelImage> imageList;
public MyAdapter(Context context, List<ModelImage> imageList) {
this.context = context;
this.imageList = imageList;
}
#NonNull
#Override
public ImageViewHOlder onCreateViewHolder(#NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_layout_item,parent,false);
return new ImageViewHOlder(view);
}
#Override
public void onBindViewHolder(#NonNull ImageViewHOlder holder, final int position) {
holder.title.setText(imageList.get(position).getPost_title());
holder.date.setText("Uploaded on: "+imageList.get(position).getDate());
Glide.with(context).load(imageList.get(position).getFeatured_image()).into(holder.imageView);
holder.check.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
String url = imageList.get(position).getPost_slug();
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
context.startActivity(i);
}
});
}
#Override
public int getItemCount() {
return imageList.size();
}
}
class ImageViewHOlder extends RecyclerView.ViewHolder{
ImageView imageView;
TextView title,date;
Button check;
public ImageViewHOlder(#NonNull View itemView) {
super(itemView);
imageView = itemView.findViewById(R.id.imageView);
title = itemView.findViewById(R.id.title);
date = itemView.findViewById(R.id.date);
check = itemView.findViewById(R.id.check);
}
}
my custom layout:
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:cardCornerRadius="15dp"
app:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="#+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginTop="25dp"
android:layout_marginEnd="5dp"
android:background="#color/colorPrimaryDark"
android:text="Visit"
android:textColor="#000"
android:textStyle="bold" />
<ImageView
android:id="#+id/imageView"
android:padding="5dp"
android:layout_marginTop="7dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:scaleType="centerCrop"
android:src="#mipmap/ic_launcher" />
<TextView
android:id="#+id/date"
android:layout_marginEnd="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/check"
android:layout_alignParentEnd="true"
android:layout_marginStart="15dp"
android:textSize="18sp"
android:textStyle="italic" />
<TextView
android:id="#+id/desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/title"
android:layout_marginStart="15dp"
android:layout_toEndOf="#+id/imageView"
android:layout_toStartOf="#+id/check"
android:singleLine="true"
android:textSize="20sp" />
<TextView
android:id="#+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_toEndOf="#+id/imageView"
android:singleLine="true"
android:textSize="20sp" />
</RelativeLayout>
</androidx.cardview.widget.CardView>

Related

customizing Tab text color, stacked color, and swipe functionality in Xamarin Android?

I have three tabs in xamarin android, I have used tab Host to create those tabs. Now, I want to change the text color in those tabs, and I want to use the swipe effect just like the Tabbed Page in Xamarin Forms. How can I achieve this? Please do tell me the library also ,if required?
I want to change the text color in those tabs, and I want to use the swipe effect just like the Tabbed Page in Xamarin Forms
You could use TabLayout, Usage like this :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.support.design.widget.TabLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="#+id/tablayout"
app:tabTextColor="#color/colorPrimary"
app:tabSelectedTextColor="#color/colorAccent"
app:tabIndicatorColor="#android:color/holo_orange_light">
<android.support.design.widget.TabItem
android:text="tab 1"/>
<android.support.design.widget.TabItem
android:text="tab 2"/>
<android.support.design.widget.TabItem
android:text="tab 3"/>
</android.support.design.widget.TabLayout>
</LinearLayout>
Attribute to change the text color :
app:tabTextColor --> The default text color to be applied to tabs.
app:tabSelectedTextColor --> The text color to be applied to the currently selected tab.
app:tabIndicatorColor --> Color of the indicator used to show the currently selected tab.
Effect like this.
use the swipe effect just like the Tabbed Page in Xamarin Forms
In Xamarin.Forms, tabs is associated with Page, actually when it render in native Android, it was associated with ViewPager. So if you want implement the swipe effect feature, you have to write the code by yourself. For more details, you could read the document.
EDIT :
To use TabLayout, you have to add Xamarin.Android.Support.v4 and Xamarin.Android.Support.Design nuget package.
EDIT 2 ;
Here is a simple demo about implement the swipe effect :
public class MainActivity : AppCompatActivity
{
private List<Android.Support.V4.App.Fragment> mFragments = new List<Android.Support.V4.App.Fragment>();
private List<string> mTabTitles = new List<string>();
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Main);
TabLayout tabLayout = FindViewById<TabLayout>(Resource.Id.tablayout);
ViewPager viewPager = FindViewById<ViewPager>(Resource.Id.view_pager);
initTab();
mFragments.Add(new Fragment1());
mFragments.Add(new Fragment1());
mFragments.Add(new Fragment1());
mFragments.Add(new Fragment1());
viewPager.Adapter = new ViewPagerAdapter(SupportFragmentManager, mFragments,mTabTitles);
tabLayout.SetupWithViewPager(viewPager);
}
private void initTab()
{
for (int i = 1; i < 5; i++)
{
mTabTitles.Add("Tab" + i);
}
}
}
public class ViewPagerAdapter : FragmentPagerAdapter
{
private List<string> mTabTitles;
private static int FRAGMENT_COUNT = 4;
public ViewPagerAdapter(Android.Support.V4.App.FragmentManager fragmentManager, List<Android.Support.V4.App.Fragment> fragments, List<string> tabTitles):base(fragmentManager)
{
mTabTitles = tabTitles;
}
public override Android.Support.V4.App.Fragment GetItem(int position)
{
Fragment1 testFragment = new Fragment1();
return testFragment;
}
public override int Count => FRAGMENT_COUNT;
public override ICharSequence GetPageTitleFormatted(int position)
{
return new Java.Lang.String(mTabTitles[position]);
}
}
axml file :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.TabLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="#+id/tablayout"
>
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="#+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</android.support.v4.view.ViewPager>
</LinearLayout>
Effect.
EDIT 3 :
In my demo, Fragment should use Android.Support.V4.App.Fragment, code like this :
public class Fragment1 : Android.Support.V4.App.Fragment
{
public override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Create your fragment here
}
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
return inflater.Inflate(Resource.Layout.YourFragment, container, false);
return base.OnCreateView(inflater, container, savedInstanceState);
}
}

Custom Marker Options in google map

Can we make Custom MarkerOptions in google?
I want to use Custom MarkerOptions to show image in Dialog box like Containng Name as title, and two image within it.
<ImageView
android:id="#+id/badge"
android:layout_width="18dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:src="#drawable/image_2"
android:adjustViewBounds="true"></ImageView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="#+id/title"
android:layout_width="20dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:ellipsize="end"
android:text="harish"
android:singleLine="true"
android:textColor="#ff000000"
android:textSize="7dp"
android:textStyle="bold" />
<ImageView
android:id="#+id/snippet"
android:layout_width="10dp"
android:layout_height="10dp"
android:ellipsize="end"
android:src="#drawable/icon_location2"
android:singleLine="true"
android:textColor="#ff7f7f7f"
android:textSize="14dp" />
</LinearLayout>
With default MarkerOption i can only get Title , Snippet in dialog box like this:
public void addMarkersToMap() {
mArun = mMap.addMarker(new MarkerOptions()
.position(ARUN)
.title("Arun")
.snippet("Match stat:")
.icon(BitmapDescriptorFactory.defaultMarker
(BitmapDescriptorFactory.HUE_AZURE)));
help me with some suggestion .
You will have to use the setInfoWindowAdapter method of GoogleMap class.
GoogleMap mMap;//You have to initialise it.
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
#Override
public View getInfoWindow(Marker marker) {
return null;
}
#Override
public View getInfoContents(Marker marker) {
/*
Here you will inflate the custom layout that you want to use for marker. I have inflate the custom view according to my requirements.
*/
View v = getLayoutInflater().inflate(R.layout.custom_marker_info_window, null);
TextView textView = (TextView) v.findViewById(R.id.text);
textView.setSelected(true);
textView.setText(poiPlayerData.getName());
return v;
}
});

Failed to create target binding for binding SelectedItem

I try to bind the selected item of a MvxListView to my property. This is my Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:fitsSystemWindows="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include
layout="#layout/toolbar_actionbar" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="#string/hint_search_text"
local:MvxBind="Text SearchText" />
<MvxListView
android:id="#+id/category_list"
android:orientation="vertical"
android:choiceMode="singleChoice"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
local:MvxItemTemplate="#layout/listitem_category"
local:MvxBind="ItemsSource Categories; SelectedItem SelectedCategory" />
</LinearLayout>
</LinearLayout>
The ItemSource here is properly bound.
ViewModel:
[ImplementPropertyChanged]
public class SelectCategoryListViewModel : AbstractCategoryListViewModel
{
/// <summary>
/// Creates an CategoryListViewModel for the usage of providing a category selection.
/// </summary>
/// <param name="categoryRepository">An instance of <see cref="IRepository{T}" /> of type category.</param>
/// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
public SelectCategoryListViewModel(IRepository<Category> categoryRepository,
IDialogService dialogService) : base(categoryRepository, dialogService)
{}
public Category SelectedCategory { get; set; }
public MvxCommand DoneCommand => new MvxCommand(Done);
public MvxCommand CancelCommand => new MvxCommand(Cancel);
private void Done()
{
MessageHub.Publish(new CategorySelectedMessage(this, SelectedCategory));
Close(this);
}
private void Cancel()
{
Close(this);
}
}
Not the notify PropertyChanged is done via Fody and Categories are in the parent VM.
public class SelectCategoryListActivity : MvxFragmentCompatActivity<SelectCategoryListViewModel>
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.fragment_category_list);
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
}
...
The Warning I get is:
[0:] MvxBind:Warning: 5.11 Failed to create target binding for binding SelectedItem for SelectedCategory
Ideas?
I just came across a similar issue with a SelectedItem binding failing. The solve was to update Mvx to version 4.1.6. The reason being is that you need to register MvxAppCompatSetupHelper.FillTargetFactories, with 4.1.6 this is now done automatically.
Alternatively, you can manually register it in you setup.cs by overriding FillTargetFactories:
protected override void FillTargetFactories(IMvxTargetBindingFactoryRegistry registry)
{
MvxAppCompatSetupHelper.FillTargetFactories(registry);
base.FillTargetFactories(registry);
}

App unfortunately stopped Working

This is my code for MainActivity.java
Here I am creating a very basic LoginApp. When the App runs, it gives "unfortunately stopped working ERROR..."
package com.example.loginapp;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends Activity implements OnClickListener {
EditText t1,t2;
Button b1;
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1= (Button) b1.findViewById(R.id.button1);
t1=(EditText) t1.findViewById(R.id.editText1);
t2=(EditText) t2.findViewById(R.id.editText2);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public void onClick(View arg0)
{
//String user;
//user = t1.setText("user");
if (arg0.findViewById(R.id.button1)==b1)
{
if ((boolean)((t1.getText().toString()=="user")) && (t2.getText().toString()=="user"))
{
Toast.makeText(this, "Login Sucessful", Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(this, "Sorry", Toast.LENGTH_SHORT).show();
t1.setText("");
t2.setText("");
}
}
}
}
Following is code for activity_main.xml
<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"
android:gravity="center"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignTop="#+id/editText1"
android:text="Username"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_centerVertical="true"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="115dp"
android:layout_marginTop="22dp"
android:ems="10" >
</EditText>
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView2"
android:layout_alignLeft="#+id/editText1"
android:ems="10"
android:inputType="numberPassword" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textView2"
android:layout_marginTop="46dp"
android:layout_toRightOf="#+id/textView2"
android:clickable="true"
android:onClick="onClick"
android:text="Login" />
</RelativeLayout>
Code for AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.loginapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.loginapp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Hi please repleace the onCreate method as
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1= (Button) findViewById(R.id.button1);
t1=(EditText) findViewById(R.id.editText1);
t2=(EditText) findViewById(R.id.editText2);
}
It will helpful for you.
After modified the code it working fine for me.Please try and let me know.

Tabs don't display on Kindle Fire

I have an Android app that uses tabs for its start menu. The tabs don't display when I port the app to a Kindle Fire. Here's the code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:isScrollContainer="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TabHost
android:id="#+id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</TabWidget>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="#+id/Beginning"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="#+id/Intermediate"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="#+id/Advanced"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>
</ScrollView>
package com.myproject.project;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.content.res.AssetManager;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Environment;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.TextView;
import android.widget.Toast;
public class TabsTestActivity extends Activity {
/** Called when the activity is first created. */
public static final String KEY_ROWID = "_id";
public static final String KEY_NAME = "name";
public static final String KEY_LEVEL = "level";
public static final String KEY_CHART = "charted";
public String extStorageDirectory = Environment
.getExternalStorageDirectory().toString();
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
PopulateDatabase();
CopyVideoFiles();
TabHost tabhost = (TabHost) findViewById(R.id.tabhost);
tabhost.setup();
TabSpec spec_beg = tabhost.newTabSpec("Beginning");
spec_beg.setContent(R.id.Beginning);
TextView txtTabInfo = new TextView(this);
txtTabInfo.setText("JUST STARTING");
Typeface font = Typeface.createFromAsset(getAssets(), "danielbd.ttf");
txtTabInfo.setTypeface(font);
txtTabInfo.setGravity(Gravity.CENTER);
txtTabInfo.setHeight(50);
txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
txtTabInfo.setTextColor(Color.parseColor("#262405"));
spec_beg.setIndicator(txtTabInfo);
TabSpec spec_int = tabhost.newTabSpec("Intermediate");
spec_int.setContent(R.id.Intermediate);
txtTabInfo = new TextView(this);
txtTabInfo.setText("GETTING THERE");
txtTabInfo.setTypeface(font);
txtTabInfo.setGravity(Gravity.CENTER);
txtTabInfo.setHeight(50);
txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
txtTabInfo.setTextColor(Color.parseColor("#262405"));
spec_int.setIndicator(txtTabInfo);
TabSpec spec_adv = tabhost.newTabSpec("Advanced");
spec_adv.setContent(R.id.Advanced);
txtTabInfo = new TextView(this);
txtTabInfo.setText("REALLY GOOD");
txtTabInfo.setTypeface(font);
txtTabInfo.setGravity(Gravity.CENTER);
txtTabInfo.setHeight(50);
txtTabInfo.setBackgroundColor(Color.parseColor("#CCDE8A"));
txtTabInfo.setTextColor(Color.parseColor("#262405"));
spec_adv.setIndicator(txtTabInfo);
// get data from database, create buttons and name them
SQLData myTable = new SQLData(this);
myTable.open();
Cursor c = myTable.getallData();
int iRow = c.getColumnIndex(KEY_ROWID);
int iName = c.getColumnIndex(KEY_NAME);
int iLevel = c.getColumnIndex(KEY_LEVEL);
// create the buttons
for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
final String RowNum = c.getString(iRow);
String Name = c.getString(iName);
final String Level = c.getString(iLevel);
Button button = new Button(this);
button.setText(Name);
button.setHeight(20);
button.setTextColor(Color.BLACK);
button.setBackgroundColor(Color.parseColor("#A89E0A"));
button.setHighlightColor(Color.WHITE);
button.setTypeface(font);
button.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
Intent choice = new Intent(getApplicationContext
(),
com.myproject.project.myclass.class);
Bundle dataBundle = new Bundle();
dataBundle.putString("RowID", RowNum);
dataBundle.putString("Level", Level);
choice.putExtras(dataBundle);
try {
startActivity(choice);
} catch (Exception e) {
Dialog d = new Dialog(getApplicationContext());
d.setTitle("TabsTestActivity line 131");
TextView tv = new TextView(getApplicationContext());
tv.setText(e.toString());
d.setContentView(tv);
d.show();
} finally {
}
}
});
LinearLayout lbeg = (LinearLayout) findViewById(R.id.Beginning);
LinearLayout lint = (LinearLayout) findViewById(R.id.Intermediate);
LinearLayout ladv = (LinearLayout) findViewById(R.id.Advanced);
if (Level.equals("Beginning"))
lbeg.addView(button);
else if (Level.equals("Intermediate"))
lint.addView(button);
else if (Level.equals("Advanced"))
ladv.addView(button);
}
tabhost.addTab(spec_beg);
tabhost.addTab(spec_int);
tabhost.addTab(spec_adv);
myTable.close();
}}
Does anyone know why? The tabs and their contents show up fine in the emulator and on my Android phone. Thanks!
I have since learned that the Kindle Fire does not support Tabs