Search Results

Search found 25798 results on 1032 pages for 'android xml'.

Page 213/1032 | < Previous Page | 209 210 211 212 213 214 215 216 217 218 219 220  | Next Page >

  • How to link paid app user account to the system ?

    - by user164589
    Hi guys, I have an issue related publishing the paid app to android market. (My application is internet connection based app.) If I've put the app to the android market, can user who bought the app pass to anyone ? How is its security (I mean safe of .apk file) ? Also, what is payment tool of android market ? My main point is choosing the best way to link paid user to our system. Actually I don't know how to link paid user account to my system(by email address or device unique id ?... what is better way ?). Can you suggest me on this part ? I really appreciate for help. Thanks in advance.

    Read the article

  • What can I access in Androids Native libraries? And How?

    - by Donal Rafferty
    I am completely new to the NDK. I have done a couple of the tutorials including the hello from jni one and another one that calculates the sum of two numbers. They involved using cygwin and the ndk to create the library so file and I have a bit of a grasp on how to insert my own libraries into the libraries layer of Android. I have now been asked to access the native libraries on Android and see what I can use them for. My question is can I do this? The STABLE-APIS.txt document is a bit vague and mentions the following as Stable C++ API's in Android 1.5 cstddef new utility stl_pair.h Does that mean I can access them? If so then how do I go about it? I dont think that following the tutorials I have already done would be any help? Any pointers on how to do this or links to tutorials etc.. would be greatly appreciated

    Read the article

  • Problem with "Hello, WebView" example

    - by arakn0
    Hi there, I'm new in android development and I am trying out the WebView example in the official android site. http://developer.android.com/guide/tutorials/views/hello-webview.html But I do everything they say...which is pretty simple: I create the project, edit the layout file, then i add the code, etc. No problems building...but when I launch the app in the simulator I just got a black screen. It is like if the Layout is empty...like if the WebView is not created. does anybody know what I am doing wrong? Thanks in advanced

    Read the article

  • How to use ColorDrawable with ImageView?

    - by user246114
    Hi, I have a layout with an ImageView defined like: <ImageView android:layout_width="45dip" android:layout_height="45dip" android:scaleType="fitXY" /> now I just want to set the imageview to be a static color, like red or green. I'm trying: ColorDrawable cd = new ColorDrawable("FF0000"); cd.setAlpha(255); ImageView iv = ...; iv.setImageDrawable(cd); the imageview is just empty though, no color. The 45dip space is being used up though. What do I need to do to get the color to be rendered? Thanks

    Read the article

  • Switch between views in Android

    - by ZelluX
    Hi, all I'm writing an Android application with multiple Tabs. The content of each tabs is determined by XMLs on the Internet, and it could be WebView for HTML rendering, GridView for photo displaying, etc. I'm going to delay downloading of those XML until the tab is clicked. Upon clicking the application will download corresponding XML from the Internet, and then choose suitable View for it. Currently I have written a MyViewDelegate and use TabSpec.setContent() to set the spec pointing to MyViewDelegate: spec = tabHost.newTabSpec(tabName[i]); intent = new Intent().setClass(this, HomeActivity.class); spec.setIndicator(title[i]); spec.setContent(new MyViewDelegate(this, tabName[i])); tabHost.addTab(spec); My problem is, after MyViewDelegate is required to draw, how can I switch to WebView/GridView and initialize it? Many thanks.

    Read the article

  • Java (Android) regular expression to strip out HTML paragraph

    - by jackbot
    I have an Android application which grabs some data from an external XML source. I've stripped out some HTML from one of the XML elements, but it's in the format: <p class="x">Some text...</p> <p>Some more text</p> <p>Some final text</p> I want to extract the middle paragraph text, how can I do this? Would a regular expression be the best way? I don't really want to start including external HTML parsing libraries.

    Read the article

  • Android - Adding Subitem to a listview

    - by Oli
    I currently have a listview which contains a couple of strings. These are called from a string array in strings.xml <string name="app_name">Taxi Me</string> <string-array name="taxi_array"> <item>Barrys Taxi</item> <item>Boom Taxi</item> </string-array> What i was trying to do is create subitems for these so that i can show fields such as address and contact details etc. I made a customlistview a while back but cant work out how i can do it using the strings.xml file? Are there any particular tags i need to use so they show up in the list view? Any help would be greatly appreciated. Thanks

    Read the article

  • Android: Send arbitrary objects within Activities?

    - by Sebastian
    I have read some question here but I didn't find a solution. I have read about Parcelable, Intents, and sharing specific data within Activities from the android dev docs (both dev guide and reference). Here's the scenario: I have one ListActivity that fills in an object parsing an xml file, it shows a list of values, and when clicked I want to return the object that represents the item clicked to the activity that has called it, for then, call another activity with this object. I read on how to implement Parcelable but seems not being the way. Implementing Parcelable receives a Parcel for the constructor and then reads the values from it (or at least that was what I understood). This makes no sense for me and I can't see how to implement basing on that issue. I build the object parsing the xml file, not having a Parcel. I appreciate some clarifications on this, regards.

    Read the article

  • quick check on use of map api (android)

    - by Peter vdL
    When you use the Google map api, it is not part of the Android SDK, and you have to mention it in your manifest xml file. Do you have to do anything to access the jar file containing the map api code? Or is that automatically present on the device or emulator, the way the SDK code is? Do you need put the map api jar file in your class path, either when compiling or when executing? Or is it kept somewhere where it is already visible, and the requirement of an XML mention is merely to remind you of the licensing issue? Thanks, Peter

    Read the article

  • Actionbar scherlock is not refreshed when the orientation is changed

    - by SavasCinar
    I use Sherlock action bar in my application. I used "ifRoom|withText" feature in my menu. If I test my code in portrait mode, I can see only icon and if I rotate orientation to landscape, still I see only icon. On the other hand, if I run with landscape, I can see text and icon on portrait and landscape. This means that When the screen is rotated, action bar is not refreshed. How can I fix? In menu, I have android:showAsAction="ifRoom|withText" Also I used this line in my manifest file to fixed android:configChanges="keyboardHidden|orientation|screenSize" but it didn't work. And I run my code android 2.3 Also I used fragment in my activity, FragmentManager fm = getSupportFragmentManager(); ft = fm.beginTransaction(); mFragment1 = fm.findFragmentByTag("f1"); if (mFragment1 == null) { mFragment1 = new MenuFragment(); ft.add(mFragment1, "f1"); } ft.commit();

    Read the article

  • Missing nativeInit when compiling multimple files

    - by RankoR
    Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := pacman LOCAL_SRC_FILES := main.cpp \ Pacman.cpp LOCAL_CFLAGS := -DANDROID_NDK \ -DDISABLE_IMPORTGL LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog include $(BUILD_SHARED_LIBRARY) In main.cpp: void Java_com_wiagames_pacman_PacmanRenderer_nativeInit(JNIEnv* env) { ... } The package is com.wiagames.pacman; The Java class, containing the nativeInit method, is PacmanRenderer in the com.wiagames.pacman package. It works fine before I added pacman.cpp, but after adding it I have: E/AndroidRuntime( 2238): FATAL EXCEPTION: GLThread 1104 E/AndroidRuntime( 2238): java.lang.UnsatisfiedLinkError: Native method not found: com.wiagames.pacman.PacmanRenderer.nativeInit:()V E/AndroidRuntime( 2238): at com.wiagames.pacman.PacmanRenderer.nativeInit(Native Method) E/AndroidRuntime( 2238): at com.wiagames.pacman.PacmanRenderer.onSurfaceCreated(MainActivity.java:120) E/AndroidRuntime( 2238): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1494) E/AndroidRuntime( 2238): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) W/ActivityManager( 306): Force finishing activity com.wiagames.pacman/.MainActivity main.c: http://pastebin.com/GPexqwcv MainActivity.java: http://pastebin.com/yWfWpyNb

    Read the article

  • Using too much memory in C/NDK?

    - by rebeccamaher
    I've recently found out there is no hard limit to how much memory you can allocate in C/NDK on Android. This is in contrast to Java where the limit is ~24Mb. I'm working on a few apps that could greatly benefit from using about ~50Mb total. Is this far too much memory to use? Does anyone have any experience with developing apps that go above the Java limit and what impact this has across devices? Obviously, I don't want to kill all background apps by consuming too much memory and I know the Android devs suggest not using too much memory but limiting all apps to ~24Mb is very limiting to certain kinds of apps. I've seen a few Android games recently that say they use ~256Mb. I'm planning to use about 50Mb total for my app. Does this sound reasonable in terms of stability across devices that have a limit of 24Mb?

    Read the article

  • OutOfMemory exception as I rotating the emulator.

    - by michael
    I get the following OutOfMemory Error as I rotating my android emulator. I start with Portrait mode. I switch to Landscape mode. And then when I switch back to Portrait mode, I get the following error: E/AndroidRuntime( 239): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 239): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 239): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 239): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 239): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 239): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 239): at android.content.res.Resources.loadDrawable(Resources.java:1705) E/AndroidRuntime( 239): at android.content.res.Resources.getDrawable(Resources.java:580)

    Read the article

  • TextView would not horizontally center

    - by theGreenCabbage
    My layout is the following: <TextView android:id="@+id/display_city" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/pollenType" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_below="@+id/get_pollen_index" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_marginTop="51dp" android:textSize="40sp" /> As you can tell, Philadelphia, PA is left-aligned. No matter what I change, whether it's centering horizontal and vertical to true, it stays left-aligned. I have tried changing the layout via the XML and graphical user interface. In the graphical user interface, it indeed is "centered", but it remains non-centered. My layout positions are consistent across all my textviews, so I am unsure as to why this particular TextView is not centered.

    Read the article

  • Show transparent color filter on a View after clicking it

    - by Maarten
    So. You know how when you click a post in the Google+ app, the entire View becomes blue. I want to do that as well, but with an ImageView. I have the following code snippet, setting the actual image as the background and the selector as the main resource. This looks good, but doesn't respect scaleType for the background image: <ImageView android:id="@+id/painting_image" android:layout_width="match_parent" android:layout_height="200dp" android:background="@drawable/img" android:src="@drawable/selector" android:scaleType="centerCrop" /> By the way, @drawable/selector is just a selector that shows a tranparent color for state_pressed: <item android:state_pressed="true"> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#44521400" /> </shape></item> How can I make this work while respecting the scaleType?

    Read the article

  • Get image url from rss Cdata

    - by zOro
    Hi , I start testing android , trying to get image from xml my Image is hosting inside xmlnode <a href="http://www.site.com/id/?id=41564"><img src="http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg" align="left" /></a> more text comes here i trying to get the http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg and displaying it ... Can you help me with that ? Thanks zOro..

    Read the article

  • How to get the file name from the intent?

    - by Sumithran
    This is my mainfeast file.After using intent filter i download the ics file from the mail attachment.when i open the downloaded file it start my application. I need to get the file name and data of the selected file in my application. What should i do in the mainfeast and the java file. I am very new to android can any one help me???? <application android:label="@string/app_name" android:icon="@drawable/icsicon"> <activity android:name=".setMIMEfile" android:label="@string/app_name"><intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="*/*" /> <data android:pathPattern=".*\\.ics" />

    Read the article

  • How to add padding for background image

    - by michael
    Hi, I have a linear layout which has a background image (a 9 patched png file). How can I add padding to left and right so that the background image does not take up the whole width? I have tried 'android:paddingLeft' and 'android:paddingRight', but that does not change anything. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="25dip" android:paddingRight="25dip" android:background="@drawable/background"> The whole background still stretches the whole screen width. Thank you for any help.

    Read the article

  • DocumentBuilder.parse() / Parsing Entities

    - by stormin986
    I'm new to parsing XML and am having an issue with entities. (Am doing this on Android, if it makes a difference). Is there a way to have it turn an entity into the character it represents? I have this in the child of an element: "isn&#39;t" (minus quotes). I would prefer it parse it and the end result be a single text node. However, right now this is turned in to TEXT, ENTITY, TEXT. Is there a way to automatically have it parse the entity into text, or a manual way to do it?

    Read the article

  • Android ListView with SQLite

    - by soclose
    Hi I'd like to refresh the Listview items. These items are populated from SQLite database. My code is below public class Weeve extends Activity { private String[] lv_arr; protected ListView CView; private DBAdapter mDbHelper; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDbHelper = new DBAdapter(this); mDbHelper.open(); Cursor c = mDbHelper.getAll(); if (c.getCount() > 0) {if (c.moveToFirst()) { ArrayList strings = new ArrayList(); do { String mC = c.getString(0); strings.add(mC); } while (c.moveToNext()); lv_arr = (String[]) strings.toArray(new String[strings.size()]); } } else Toast.makeText(this, "No more Records", Toast.LENGTH_SHORT).show(); c.close(); ListView CView = new ListView(this); CView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, lv_arr)); setContentView(CView);}} I'd like to make refreshing this list view after adding, updating or deleting SQLite table. These operations are called by content or option menu. I tried to create these code into a separated function and call it after every operation. But can't. I think setContentView(CView) statement. I also tried to use SimpleCursorAdapter like notepad sample from Android.com. I got Thread error. Help me.

    Read the article

  • Random pauses with "Key dispatching timed out sending to <null>" when closing Android SurfaceView

    - by kenyee
    When I close an Android SurfaceView Activity, the app sometimes pauses and almost gets an ANR (Application Not Responding) message. Looking at LogCat, it appears to be timing out trying to send keys to it. I tried modifying the code to setFocusable(false) when in the onKeyDown handler for the SurfaceView, but that doesn't seem to affect this. Any other ideas on what might be causing this? Or what these messages in Logcat even mean? ============================= 05-31 19:35:35.285: INFO/WindowManager(586): focus null mToken is null at event dispatch! 05-31 19:35:35.295: WARN/WindowManager(586): Current state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to null @ 1275334535292 lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:35.305: WARN/WindowManager(586): Continuing to wait for key to be dispatched 05-31 19:35:40.306: WARN/WindowManager(586): Key dispatching timed out sending to 05-31 19:35:40.316: WARN/WindowManager(586): Dispatch state: {{KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window{43763540 com.myapp/com.myapp.DiagramEdit paused=false} @ 1275334499512 lw=Window{43763540 com.myapp/com.myapp.DiagramEdit paused=false} lb=android.os.BinderProxy@43702190 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:40.326: INFO/WindowManager(586): focus null mToken is null at event dispatch! 05-31 19:35:40.326: WARN/WindowManager(586): Current state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to null @ 1275334540327 lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:40.326: WARN/WindowManager(586): Continuing to wait for key to be dispatched

    Read the article

  • Add an array of buttons to a GridView in an Android application

    - by Tai Squared
    I have an application that will have 5-15 buttons depending on what is available from a backend. How do I define the proper GridView layout files to include an array of buttons that will each have different text and other attributes? Each button will essentially add an item to a cart, so the onClick code will be the same except for the item it adds to the cart. How can I define an array so I can add a variable number of buttons, but still reference each of them by a unique ID? I've seen examples of the arrays.xml, but they have created an array of strings that are pre-set. I need a way to create an object and not have the text defined in the layout or arrays xml file. Update - Added info about adding to a GridView I want to add this to a GridView, so calling the addView method results in an UnsupportedOperationException. I can do the following: ImageButton b2 = new ImageButton(getApplicationContext()); b2.setBackgroundResource(R.drawable.img_3); android.widget.LinearLayout container = (android.widget.LinearLayout) findViewById(R.id.lay); container.addView(b2); but that doesn't layout the buttons in a grid like I would like. Can this be done in a GridView?

    Read the article

  • Android: How to keep onItemSelected from firing off on a newly instantiated Spinner

    - by Drennen
    I've thought of some less than elegant ways to solve this, but I know I must be missing something. My onItemSelected fires off immediately without any interaction with the user, and this is undesired behavior. I wish for the UI to wait until the user selects something before it does anything. I even tried setting up the listener in the onResume, hoping that would help, but it doesn't. How can I stop this from firing off before the user can touch the control? THANKS public class CMSHome extends Activity { private Spinner spinner; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Heres my spinner /////////////////////////////////////////// spinner = (Spinner) findViewById(R.id.spinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( this, R.array.pm_list, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); }; public void onResume() { super.onResume(); spinner.setOnItemSelectedListener(new MyOnItemSelectedListener()); } public class MyOnItemSelectedListener implements OnItemSelectedListener { public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { Intent i = new Intent(CMSHome.this, ListProjects.class); i.putExtra("bEmpID", parent.getItemAtPosition(pos).toString()); startActivity(i); Toast.makeText(parent.getContext(), "The pm is " + parent.getItemAtPosition(pos).toString(), Toast.LENGTH_LONG).show(); } public void onNothingSelected(AdapterView parent) { // Do nothing. } } }

    Read the article

  • Android: Create spinner programmatically from array

    - by Select0r
    Hi, I'm all new to Android and I'm trying to create a spinner programmatically and feeding it with data from an array, but Eclipse gives me a warning that I can't handle. Here's what I got: This ArrayList holds the elements that should be in the spinner (gets filled from a file later on): ArrayList<String> spinnerArray = new ArrayList<String>(); This is code I found on a site which should create the spinner: Spinner spinner = new Spinner(this); ArrayAdapter spinnerArrayAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, spinnerArray); spinner.setAdapter(spinnerArrayAdapter); Now the second line (ArrayAdapter...) gives me a warning in Eclipse saying "ArrayAdapter is a raw type... References to generic type ArrayAdapter<T> should be parameterized", I have no idea how to fix this (or what that means in the first place :) ). It's just a warning and the App seems to run alright, but I'd still like to understand what's wrong and fix it. Any hint is appreciated. Greetings, Select0r

    Read the article

< Previous Page | 209 210 211 212 213 214 215 216 217 218 219 220  | Next Page >