How to remove "OK" button from Dialog fragment in Android - android-dialogfragment

I'm trying to remove the OK button completely so that an item is automatically clicked when selected. I noticed that this is Android's preferred way of doing it. I don't need a "cancel" button because I want to prevent null selected.
Dialog Fragment
public class SingleChoiceClass extends
DialogFragment {`
final CharSequence[] items = {"b1", "b2", "b3", "b4"};
String selection;
#NonNull
#Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());`
builder.setTitle("Choose").setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface arg0, int arg1) {
switch (arg1){
case 0:
selection = (String) items[arg1];
break;
case 1:
selection = (String) items[arg1];
break;
case 2:
selection = (String) items[arg1];
break;
case 3:
selection = (String) items[arg1];
break;
}
}
}).setPositiveButton("OK", new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
// Display toast with the user's selection
Toast.makeText(getActivity(), "Your choice is : " + selection, Toast.LENGTH_SHORT).show();
}
});
return builder.create();
}
}
The code works fine as it is, I just want to get selected item without having to click "OK" button. It saves user's time.

I'm not sure if this is the Android recommended way of doing this but I finally figured out a way of achieving the exact behavior I want.
public class SingleChoiceClass extends
DialogFragment {
final CharSequence[] items = {"b1", "b2", "b3", "b4"};
String selection;
#NonNull
#Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final MainActivity activity = (MainActivity) getActivity();
builder.setTitle("Choose")
.setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface arg0, int arg1) {
switch (arg1){
case 0:
selection = (String) items[arg1];
Toast.makeText(getActivity(), "" + selection,Toast.LENGTH_SHORT).show();
// Do your magic
dismiss();
break;
case 1:
selection = (String) items[arg1];
Toast.makeText(getActivity(), "" + selection,Toast.LENGTH_SHORT).show();
// Do your magic
dismiss();
break;
case 2:
selection = (String) items[arg1];
Toast.makeText(getActivity(), "" + selection,Toast.LENGTH_SHORT).show();
// Do your magic
dismiss();
break;
case 3:
selection = (String) items[arg1];
Toast.makeText(getActivity(), "" + selection,Toast.LENGTH_SHORT).show();
// Do your magic
dismiss();
break;
}
}
}).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
//Exit
activity.finish(); //Or find a way to relaunch Dialog
}
});
return builder.create();
}
}

Related

Custom ISaveHandler and IWindowCloseHandler for Eclipse e4 text editor app

Related to question "Custom message when closing a part in Eclipse RCP 4"
I also have a Eclipse RCP 4 application with multiple editor parts (implementing MDirtyable and #Persist).
The parts are closable. When the user is closing a part there should be a custom pop-up which is asking the user if he really wants to save the part or not.
Also when the user close the appliaction a pop-up should prompt the user to close/save the dirty parts.
Basically it is intended to remove the default close eclipse e4 dialogs.
I have implemented custom ISaveHandler and IWindowCloseHandler subscribed to the application startup complete event UIEvents.UILifeCycle.APP_STARTUP_COMPLETE in the life cycle class.
Custom IWindowCloseHandler works fine (in terms of dialogs) but custom ISaveHandler is not.
ISaveHandler.save returns stackoverflow error when defined as follows:
#Override
public boolean save(MPart dirtyPart, boolean confirm) {
EPartService partService = dirtyPart.getContext().get(EPartService.class);
//Try to close the part and save the document to disc by
//calling the #Persist method
return partService.savePart(dirtyPart, confirm);
}
I have attached the complete LifeCycleManager class:
public class LifeCycleManager {
#Inject IEventBroker eventBroker;
#ProcessAdditions
public void processAdditions(MApplication application, EModelService modelService){
MWindow window =(MWindow)modelService.find("application-trimmedwindow", application);
eventBroker.subscribe(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE,
new AppStartupCompleteEventHandler(window, modelService, application));
}
public class AppStartupCompleteEventHandler implements EventHandler {
private MWindow theWindow;
private MApplication app;
private ISaveHandler saveHandler;
AppStartupCompleteEventHandler(MWindow window, EModelService modelService, MApplication application){
theWindow = window;
app = application;
}
#Override
public void handleEvent(Event event) {
theWindow.getContext().set(ISaveHandler.class, new ISaveHandler() {
#Override
public boolean save(MPart dirtyPart, boolean confirm) {
System.out.println("PARTE PARA SALVAR..." + dirtyPart.getLabel());
EPartService partService = dirtyPart.getContext().get(EPartService.class);
//partService.hidePart(dirtyPart,true);
return partService.savePart(dirtyPart, confirm);
//return true;
}
#Override
public boolean saveParts(Collection<MPart> dirtyParts, boolean confirm) {
return false;
}
#Override
public Save promptToSave(MPart dirtyPart) {
return promptToSaveDialog(dirtyPart);
}
#Override
public Save[] promptToSave(Collection<MPart> dirtyParts) {
return null;
}
});
saveHandler = (ISaveHandler)theWindow.getContext().get(ISaveHandler.class);
theWindow.getContext().set(IWindowCloseHandler.class, new IWindowCloseHandler() {
#Override
public boolean close(MWindow window) {
List<MHandler> listHandlers = window.getHandlers();
System.out.println(listHandlers.size());
Shell shell = (Shell) window.getWidget();
if (MessageDialog.openConfirm(shell, "Close Nastran Editor", "Do you really want to close the entire application?")) {
Collection<EPartService> allPartServices = getAllPartServices(app);
if (containsDirtyParts(allPartServices)) {
return iterateOverDirtyParts( allPartServices);
}
else {
return true;
}
}
return false;
}});
}
private Collection<EPartService> getAllPartServices(MApplication application) {
List<EPartService> partServices = new ArrayList<EPartService>();
EModelService modelService = application.getContext().get(EModelService.class);
List<MWindow> elements = modelService.findElements(application, MWindow.class, EModelService.IN_ACTIVE_PERSPECTIVE,
new ElementMatcher(null, MWindow.class, (List<String>) null));
for (MWindow w : elements) {
if (w.isVisible() && w.isToBeRendered()) {
EPartService partService = w.getContext().get(EPartService.class);
if (partService != null) {
partServices.add(partService);
}
}
}
return partServices;
}
private boolean containsDirtyParts(Collection<EPartService> partServices) {
for (EPartService partService : partServices) {
if (!partService.getDirtyParts().isEmpty()) return true;
}
return false;
}
private boolean iterateOverDirtyParts(Collection<EPartService> allPartServices) {
for (EPartService partService : allPartServices) {
Collection<MPart> dirtyParts = partService.getDirtyParts();
for(MPart dirtyPart : dirtyParts) {
switch(saveHandler.promptToSave(dirtyPart)) {
case NO: break;
case YES:
saveHandler.save(dirtyPart, false);
break;
case CANCEL:return false;
}
}
}
return true;
}
private Save promptToSaveDialog(MPart dirtyPart) {
MessageDialog dialog = new MessageDialog( (Shell)theWindow.getWidget(), "Save file", null,
"'"+dirtyPart.getLabel()+"' has been modified. Save changes?", MessageDialog.QUESTION, new String[] { "YES", "NO", "CANCEL" }, 0);
switch (dialog.open()){
case 0: return Save.YES;
case 1: return Save.NO;
case 2: return Save.CANCEL;
default:return Save.CANCEL;
}
}
}
}///END of LifeCycleManager
The save method of ISaveHandler is called from within the EPartService savePart method so you cannot call savePart again.
Instead you should just call the #Persist method of the part. So something like:
#Override
public boolean save(final MPart dirtyPart, final boolean confirm)
{
if (confirm)
{
switch (promptToSave(dirtyPart))
{
default:
case NO:
return true;
case CANCEL:
return false;
case YES:
break;
}
}
try
{
ContextInjectionFactory.invoke(dirtyPart.getObject(), Persist.class, dirtyPart.getContext());
}
catch (final InjectionException ex)
{
// TODO ignore or log error
}
return true;
}

How can i start an Activity from my sherlock ActionBar Item?

how can I start any activity from my sherlock ActionBar Item Navigation Menu?
This is my code (i've tried with toast for now and function).
public class MainActivity extends SherlockActivity implements OnNavigationListener {
private String[] pasti;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
pasti = getResources().getStringArray(R.array.Pasti);
Context context = getSupportActionBar().getThemedContext();
ArrayAdapter<CharSequence> list = ArrayAdapter.createFromResource(context, R.array.Pasti, R.layout.sherlock_spinner_item);
list.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setSubtitle("The Subtitle");
getSupportActionBar().setDisplayShowTitleEnabled(true);
getSupportActionBar().setDisplayShowCustomEnabled(false);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getSupportActionBar().setListNavigationCallbacks(list, this);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayUseLogoEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
#Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
Toast toast=Toast.makeText(this,"Selected: " + pasti[itemPosition],Toast.LENGTH_LONG);
toast.show();
return true;
}
}
`
please help. thanks
I've solved with this code:
switch (itemPosition) {
case 1:
Intent primi = new Intent();
primi.setClass(getApplicationContext(), PrimiPiatti.class);
startActivity(primi);
break;
case 2:
break;
case 3:
break;
}
// return super.onOptionsItemSelected(itemPosition);
return true;
}
};
getSupportActionBar().setListNavigationCallbacks(mSpinnerAdapter, mOnNavigationListener);
}
#Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
// TODO Auto-generated method stub
return false;
}

Passing Text From Listview to another Activity when I click action item of the listview

I have a listview in my main activity.In each row i have a image view,when i click that image view QuickAction(Like popover in ios) will appears.My request is, I want to setText the text from listview to the another Activity's edittext when i click the action item in the quick action.Please help..
Here is my Main Activity
public class ExampleActivity extends Activity {
private static final int ID_UP = 1;
private static final int ID_DOWN = 2;
private static final int ID_SEARCH = 3;
private static final int ID_INFO = 4;
private QuickAction quickAction;
private ActionItem nextItem;
private ActionItem prevItem;
private ActionItem searchItem;
private ListView view;
private ContactsAdapter adapter;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
view = (ListView) findViewById(R.id.listView1);
final Weather weather_data[] = new Weather[] { new Weather(R.drawable.icon, "Cloudy"),
new Weather(R.drawable.icon, "Showers"),
new Weather(R.drawable.icon, "Snow"),
new Weather(R.drawable.icon, "Storm"),
new Weather(R.drawable.icon, "Sunny")
};
adapter = new ContactsAdapter(this, R.layout.main1,
weather_data);
}
void functiontorun(View view1) {
quickAction = new QuickAction(this,QuickAction.HORIZONTAL);
nextItem = new ActionItem(ID_DOWN, "Next", getResources().getDrawable(
R.drawable.menu_down_arrow));
prevItem = new ActionItem(ID_UP, "Prev", getResources().getDrawable(
R.drawable.menu_up_arrow));
searchItem = new ActionItem(ID_SEARCH, "Find", getResources()
.getDrawable(R.drawable.menu_search));
// use setSticky(true) to disable QuickAction dialog being dismissed
// after an item is clicked
prevItem.setSticky(true);
nextItem.setSticky(true);
// add action items into QuickAction
quickAction.addActionItem(nextItem);
quickAction.addActionItem(prevItem);
quickAction.addActionItem(searchItem);
// Set listener for action item clicked
final int position1 = view.getPositionForView(view1);
quickAction
.setOnActionItemClickListener(new QuickAction.OnActionItemClickListener() {
#Override
public void onItemClick(QuickAction source, int pos,
int actionId) {
ActionItem actionItem = quickAction.getActionItem(pos);
if (actionId == ID_SEARCH) {
Intent i=new Intent(ExampleActivity.this,Second.class);
i.putExtra("position",position1 );
Log.v("position","po" +position1);
startActivity(i);
} else if (actionId == ID_INFO) {
Toast.makeText(getApplicationContext(),
"I have no info this time",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(),
actionItem.getTitle() + " selected",
Toast.LENGTH_SHORT).show();
}
}
});
quickAction.show(view1);
}
}
And my another activity
public class Second extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
EditText d1=(EditText) findViewById(R.id.editText1);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
final int position = (Integer) bundle.get("position");
Log.v("position","po1 " +position);
ArrayList<Weather> array = new ArrayList<Weather>();
Log.v("position","po1 " +array);
}
}
}
contacts adapter:
public class ContactsAdapter extends ArrayAdapter{
Context context;
int layoutResourceId;
Weather data[] = null;
public ContactsAdapter(Context context, int layoutResourceId, Weather[] data) {
super(context, layoutResourceId, data);
this.layoutResourceId = layoutResourceId;
this.context = context;
this.data = data;
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
WeatherHolder holder = null;
if(row == null)
{
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
row = inflater.inflate(layoutResourceId, parent, false);
holder = new WeatherHolder();
holder.imgIcon = (ImageView)row.findViewById(R.id.imageView1);
holder.imgIcon.findViewById(R.id.imageView1).setOnClickListener(mBuyButtonClickListener);
holder.txtTitle = (TextView)row.findViewById(R.id.textView1);
//((ImageView) row.findViewById(R.id.im)).setOnClickListener(mBuyButtonClickListener);
row.setTag(holder);
}
else
{
holder = (WeatherHolder)row.getTag();
}
Weather weather = data[position];
holder.txtTitle.setText(weather.title);
holder.imgIcon.setImageResource(weather.icon);
return row;
}
static class WeatherHolder
{
ImageView imgIcon;
TextView txtTitle;
}
private OnClickListener mBuyButtonClickListener = new OnClickListener() {
#Override
public void onClick(View v) {
((ExampleActivity) context).functiontorun(v);
}
};
}
private OnClickListener mBuyButtonClickListener = new OnClickListener() {
#Override
public void onClick(View v) {
WeatherHolder holder = (WeatherHolder) v.getTag;
String string = holder.txtTitle .getText();
((ExampleActivity) context).functiontorun(string);
}
};
just pass the string to your activity and change the parameter of the functiontorun as string

How to close ActionMode on change FragmentTab

I'm using ActionBarSherlock with FragmentTabs like in the FragmentTabs Demo.
How can I close a ActionMode when open a different FragmentTab from my TabHost.
regards
derjens
link to the ActionBarSherlock Demo : FragmentTab.java / Tab LoaderCursorSupport.java
and here the code from my ActionMode:
#Override
public void onListItemClick(ListView l, View v, int position, long id) {
selectedRowId = id;
mMode = ((SherlockFragmentActivity) getActivity()).startActionMode(new TodoActionMode());
}
private final class TodoActionMode implements ActionMode.Callback {
#Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
boolean isLight = DashboardActivity.THEME == R.style.Theme_Sherlock_Light;
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.todo_actionmode_menu, menu);
return true;
}
#Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return false;
}
#Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_todo_actionmode_remove:
eintragLoeschen(selectedRowId);
return true;
case R.id.menu_todo_actionmode_new:
neuerTask();
return true;
default:
mMode.finish();
return true;
}
}
#Override
public void onDestroyActionMode(ActionMode mode) {
mMode = null;
}
}
private void eintragLoeschen(final long rowId) {
//eigenen dialog erstellen
final Dialog dialog = new Dialog(getActivity());
dialog.setContentView(R.layout.projekttab_todolist_task_delete_dialog);
dialog.setTitle(R.string.task_wirklich_loeschen_title);
//OK und Abbrechen Button zuweisen
Button dialogButtonAbbrechen = (Button) dialog.findViewById(R.id.button_abbrechen);
Button dialogButtonOk = (Button) dialog.findViewById(R.id.button_ok);
//wenn Button Abbrechen gedrueckt wurde
dialogButtonAbbrechen.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
dialog.dismiss(); //schliese dialog
}
});
//wenn Button Ok gedrueckt wurde
dialogButtonOk.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
//TODO Eintrag Löschen auf ArrayAdapter ändern
Uri uri = ContentUris.withAppendedId(TodoTable.CONTENT_URI, todolist.get((int) rowId).getId());
getActivity().getContentResolver().delete(uri, null, null);
mAdapter.remove(todolist.get((int) rowId));
mAdapter.notifyDataSetChanged();
mMode.finish();
dialog.dismiss();
}
});
//zeige dialog
dialog.show();
}
You can close actionmode by calling addOnPageChangeListener like this
viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout){
#Override
public void onPageScrollStateChanged(int state) {
if(ActionModeController.mActionMode != null)
ActionModeController.mActionMode.finish();
}
});

how to get data from database with parameter

I'm trying to show a list with the list items from my database having 2 parameters, but the list didn't show.
Here's my query database from php:
$query = mysql_query("SELECT d.model_name from detail_product d join brand b on d.id_brandtype = b.id_brand join biketype t on d.id_biketype = t.id_type where d.id_brandtype = 1 and d.id_biketype=1");
I've set the parameter there.
and here's my DAO:
public class info_xc_dao {
public final static int VIEW_POL_XC = 0;
private static final String URL_VIEW_POL_XC = ServerConfiguration.SERVER_URL
+ "polygon_xc.php";
private int Action;
pol_xc_Result pol_xc_Result;
public info_xc_dao(pol_xc_Result pol_xc_Result) {
// TODO Auto-generated constructor stub
this.pol_xc_Result = pol_xc_Result;
}
public void view_pol_xc() {
Action = VIEW_POL_XC;
new ConnectionHandler(connectionResult, null, URL_VIEW_POL_XC,
ConnectionHandler.GET);
}
public ConnectionResult connectionResult = new ConnectionResult() {
#Override
public void gotResult(String result, String message) {
// TODO Auto-generated method stub
if (result != null) {
switch (Action) {
case VIEW_POL_XC:
try {
JSONObject jsonObject = null;
jsonObject = new JSONObject(result);
int response = jsonObject.getInt("result");
if (response != 0) {
JSONArray jsonArray = new JSONArray(
jsonObject.getString("data"));
ArrayList<Entity_Detail_Product> arrayList = new ArrayList<Entity_Detail_Product>();
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject pol_xc = new JSONObject(jsonArray
.get(i).toString());
Entity_Detail_Product ent_detail_product = new Entity_Detail_Product();
ent_detail_product.setModel_name(pol_xc
.getString("model_name"));
arrayList.add(ent_detail_product);
}
pol_xc_Result.gotResult(arrayList, null, Action);
} else {
String error_message = jsonObject
.getString("message");
pol_xc_Result.gotResult(null, error_message,
Action);
}
} catch (JSONException e) {
// TODO: handle exception
pol_xc_Result.gotResult(null,
"Failed parsing data from database. Please try again.. "
+ e.getMessage(), Action);
Log.e("CON ERROR", e.getMessage());
}
}
} else {
pol_xc_Result.gotResult(null, message, Action);
Log.e("CON ERROR", message);
}
}
};
public static abstract class pol_xc_Result {
public abstract void gotResult(Object obj, String message, int action);
}
and here's my activity to call DAO.
public class Information_XC_Activity extends ListActivity {
WebView mWebView;
TextView tv;
private Adapter_DetailPolXC adapterDetailPolXC;
private ListView mainListView;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.info_xc);
final ActionBar actionBar = (ActionBar) findViewById(R.id.actionbar);
actionBar.setTitle(getString(R.string.app_name));
int index = getIntent().getIntExtra("text", 0);
mWebView = (WebView) findViewById(R.id.webview_xc);
String temp = "<html><body>" + "<p align=\"justify\">"
+ getString(R.string.xc_info + index) + "</p> "
+ "</body></html>";
mWebView.loadData(temp, "text/html", "utf-8");
ArrayList<Entity_Detail_Product> arraylist = new ArrayList<Entity_Detail_Product>();
adapterDetailPolXC = new Adapter_DetailPolXC(this, R.layout.info_row,
arraylist);
setListAdapter(adapterDetailPolXC);
new info_xc_dao(response).view_pol_xc();
}
pol_xc_Result response = new pol_xc_Result() {
#Override
public void gotResult(Object obj, String message, int action) {
// TODO Auto-generated method stub
// actionBar.setProgressBarVisibility(View.INVISIBLE);
#SuppressWarnings("unchecked")
ArrayList<Entity_Detail_Product> arrayList = (ArrayList<Entity_Detail_Product>) obj;
AlertDialog.Builder builder = new AlertDialog.Builder(
Information_XC_Activity.this);
if (arrayList == null) {
builder.setIcon(R.drawable.alert_warning);
builder.setTitle("Error");
builder.setMessage("Data Not Found !");
builder.setNegativeButton("Ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
}
});
AlertDialog alert = builder.create();
alert.show();
} else {
for (Entity_Detail_Product entity_Detail_Product : arrayList) {
adapterDetailPolXC.add(entity_Detail_Product);
}
adapterDetailPolXC.notifyDataSetChanged();
}
}
};
private class Adapter_DetailPolXC extends
ArrayAdapter<Entity_Detail_Product> {
private ArrayList<Entity_Detail_Product> items;
public Adapter_DetailPolXC(Context context, int textViewResourceId,
ArrayList<Entity_Detail_Product> items) {
super(context, textViewResourceId, items);
this.items = items;
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View v = convertView;
if (v == null) {
LayoutInflater layoutInflater = (LayoutInflater) getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = (View) layoutInflater.inflate(R.layout.info_xc, null);
}
Entity_Detail_Product adapter_Detail_Product = items.get(position);
if (adapter_Detail_Product != null) {
TextView textView = (TextView) v.findViewById(R.id.tv_test);
if (textView != null)
textView.setText(adapter_Detail_Product.getModel_name());
}
return v;
}
}
and here's my logcat :
09-22 12:41:30.239: W/IInputConnectionWrapper(12808): showStatusIcon on inactive InputConnection
09-22 12:41:33.129: E/HttpResponse(12808): {"result":1,"data":[{"0":"1","id_brand":"1","1":"Polygon","brand_name":"Polygon"},{"0":"2","id_brand":"2","1":"United Bike","brand_name":"United Bike"},{"0":"3","id_brand":"3","1":"WimCycle","brand_name":"WimCycle"}]}
09-22 12:41:35.009: E/HttpResponse(12808): {"result":1,"data":[{"0":"1","id_type":"1","1":"Cross Country (XC)","type_name":"Cross Country (XC)"},{"0":"2","id_type":"2","1":"Bicycle Motocross (BMX)","type_name":"Bicycle Motocross (BMX)"},{"0":"3","id_type":"3","1":"Free Ride (FR)","type_name":"Free Ride (FR)"},{"0":"4","id_type":"4","1":"DownHill (DH)","type_name":"DownHill (DH)"},{"0":"5","id_type":"5","1":"DirtJump (DJ)","type_name":"DirtJump (DJ)"},{"0":"6","id_type":"6","1":"Road Bike (RB)","type_name":"Road Bike (RB)"}]}
09-22 12:41:37.219: D/PhoneWindow(12808): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView#405440f0 has no id.
09-22 12:41:37.519: I/webclipboard(12808): clipservice: android.sec.clipboard.ClipboardExManager#405d4d40
09-22 12:41:37.839: V/webview(12808): OnSizeChanged: Enter
09-22 12:41:37.859: E/HttpResponse(12808): {"result":1,"data":[{"0":"1","id_type":"1","1":"Cross Country (XC)","type_name":"Cross Country (XC)"},{"0":"2","id_type":"2","1":"Bicycle Motocross (BMX)","type_name":"Bicycle Motocross (BMX)"},{"0":"3","id_type":"3","1":"Free Ride (FR)","type_name":"Free Ride (FR)"},{"0":"4","id_type":"4","1":"DownHill (DH)","type_name":"DownHill (DH)"},{"0":"5","id_type":"5","1":"DirtJump (DJ)","type_name":"DirtJump (DJ)"},{"0":"6","id_type":"6","1":"Road Bike (RB)","type_name":"Road Bike (RB)"}]}
09-22 12:41:38.169: E/CON ERROR(12808): No value for model_name
09-22 12:41:38.859: V/webview(12808): ZoomScale 3 mPreserveZoom: false
09-22 12:41:38.889: D/CONTEXT(12808): m_mainFrame->editor()->hasComposition not
09-22 12:41:38.959: D/CONTEXT(12808): m_mainFrame->editor()->hasComposition not