Search Results

Search found 41 results on 2 pages for 'umma'.

Page 1/2 | 1 2  | Next Page >

  • how to set custom title bar TextView Value dynamically in android?

    - by UMMA
    friends, i have created custom title bar using following titlebar.xml file with code <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textColor="@color/titletextcolor" android:layout_marginLeft="25px" android:paddingTop="3px" /> and java code to display custom title bar on each activity. @Override public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle); super.onCreate(savedInstanceState); setContentView(R.layout.main); } now i want to set textview value dynamically in each activity can any one guide me how can i achieve this? using findviewbyid here i dont get reference of that textview to set value because main layout does not contains any textbox with such a name but mytitle. any help would be appriciated.

    Read the article

  • java.lang.OutOfMemoryError: bitmap size exceeds VM budget ?

    - by UMMA
    friends, i am using following code to display bitmap on screen and having next and previous buttons to change images. and getting out of memory error New Code HttpGet httpRequest = null; try { httpRequest = new HttpGet(mImage_URL[val]); } catch (Exception e) { return 0; } HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = (HttpResponse) httpclient.execute(httpRequest); Bitmap bm; HttpEntity entity = response.getEntity(); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity); InputStream is = bufHttpEntity.getContent(); try { bm = BitmapFactory.decodeStream(is); }catch(Exception ex) { } is.close(); Old Code URL aURL = new URL(mImage_URL[val]); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = null; try { is= conn.getInputStream(); }catch(IOException e) { } BufferedInputStream bis = new BufferedInputStream(is); bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); img.setImageBitmap(bm); and it was giving me error decoder-decode return false. on images of size bigger than 400kb. so after googling i got new code as answer the old code was not giving me out of memory error on those images but decoder-decode return false, so i choosed new code. any one guide me what is the solution and which is the best approach to display live images?

    Read the article

  • how to set listviewadapter in android custom dialog?

    - by UMMA
    hi, i am using following code to setlistview adapter but giving me error at last line public class MyCustomDialog extends Dialog { String[] items= {"lorem", "ipsum", "dolor", "sit", "amet", "consectetuer", "adipiscing", "elit", "morbi", "vel", "ligula", "vitae", "arcu", "aliquet", "mollis", "etiam", "vel", "erat", "placerat", "ante", "porttitor", "sodales", "pellentesque", "augue", "purus"}; TextView selection; public MyCustomDialog(Context context) { super(context); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylistviewdialog); ListView lst=(ListView)findViewById(R.id.mylist); lst.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, items)); // error here The constructor ArrayAdapter<String>(MyCustomDialog, int, String[]) is undefined } } please guide what mistake am i doing? any help would be appreciated.

    Read the article

  • android spinner width problem?

    - by UMMA
    dear friends, i have created following layout. <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TableRow> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Post As" /> <Spinner android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ddlPostAs" /> </TableRow> <TableRow> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Expires In" /> <Spinner android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ddlExpiryOn" /> </TableRow> </TableLayout> in which android spinner changes its width according to the data. i want to stop it. can any one guide me how to achieve this? any help would be appriciated.

    Read the article

  • how to clear all map overlays or markers from google map in android?

    - by UMMA
    dear friends, i want to clear all map overlays or markers from google map and using following code if(!mapOverlays.isEmpty()) { mapOverlays.clear(); } which is giving me exception can any one guide me? am i right or wrong if i am wrong then kindly provide me the solution to my problem. i want map clean if there is any marker on it. any help would be appriciated.

    Read the article

  • image slideshow example in android?

    - by UMMA
    dear friends, i want to create image slideshow in android. i have many images in android gridview now i want to open manual slideshow if any image is clicked so that i could view it by moving finger left or right next and previous images like android built in gallery. any one guide me how to achieve this? any help would be appriciated.

    Read the article

  • android form Fields grouping?

    - by UMMA
    dear friends, i want to know that is there any way to create groups in a form? i am not talking about heading but groups we make with borders around set of specified field sets.(field sets are for example TextView,EditText and button). for example. Vital information: ----- Other information ----- any help would be appriciated.

    Read the article

  • is it possible to create listview inside dialog?

    - by UMMA
    dear friends, i have created a custom dialog class public class NewPost extends Dialog { // functionality } now my requirement is to create listview inside it. i know we can create textboxes,buttons,dropdown list inside it. but in order to create list view we should inherit our class from listActivity class what you suggest is it possible or not if yes then how to achieve this using any interface or what? any help would be appriciated.

    Read the article

  • how to add Continue String Sign like "..." in TextView?

    - by UMMA
    if i add string in a TextView for example, this is my string and TextView max length is 4 It should look like in activity this... or t... that means string continue sign at the end of assigned string if string size is bigger than Max length. Can any one guide me what should i do or i will have to manually add "..." at the end of string through programming. Any help would be appreciated.

    Read the article

  • HTC Hero Mouse Ball click not working on Custom ListView?

    - by UMMA
    dear friends, i have created custom list view using class EfficientAdapter extends BaseAdapter implements { private LayoutInflater mInflater; private Context context; public EfficientAdapter(Context context) { mInflater = LayoutInflater.from(context); this.context = context; } public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; convertView = mInflater.inflate(R.layout.adaptor_content, null); convertView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { } }); } and other necessary methods... also } using touch screen when i click on list item OnClickListener of list item is called. but when i use Mouse Ball / Track Ball (Phone Hardware) to click on ListItem OnClickListener of list item is not called. can any one guide me is this Phone bug or My Fault? any help would be appriciated.

    Read the article

  • how to handle out of memory error?

    - by UMMA
    dear friends, i am using following code to display bitmap in my imageview. when i try to load image of size for example bigger than 1.5MB it give me error any one suggest me solution? try { URL aURL = new URL(myRemoteImages[val]); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = null; try { is= conn.getInputStream(); }catch(IOException e) { return 0; } int a= conn.getConnectTimeout(); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm; try { bm = BitmapFactory.decodeStream(bis); }catch(Exception ex) { bis.close(); is.close(); return 0; } bis.close(); is.close(); img.setImageBitmap(bm); } catch (IOException e) { return 0; } return 1; Log cat 06-14 12:03:11.701: ERROR/AndroidRuntime(443): Uncaught handler: thread main exiting due to uncaught exception 06-14 12:03:11.861: ERROR/AndroidRuntime(443): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 06-14 12:03:11.861: ERROR/AndroidRuntime(443): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)

    Read the article

  • how to create trackballevent in android custom adapter?

    - by UMMA
    dear friends, i am using following code to create custom adapter for listview. now i want to use trackball click event in it but i dont know how to do that can any one help me out in creating ontracballevent in custom adapter? i have tried writing few lines but not able to solve it. public class EfficientAdapter extends BaseAdapter implements Filterable { private LayoutInflater mInflater; private Context context; int pos; public EfficientAdapter(Context context) { mInflater = LayoutInflater.from(context); this.context = context; } public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; convertView = mInflater.inflate(R.layout.adaptor_contentposts, null); convertView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //click functionality } }); MotionEvent event= MotionEvent.CREATOR.createFromParcel(null); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: //display click message } convertView.onTrackballEvent(event); return convertView; } class ViewHolder { TextView textLine; TextView textLine2; TextView PostedByAndPostedOn; ImageButton ImgButton; } @Override public Filter getFilter() { return null; } @Override public long getItemId(int position) { return 0; } @Override public int getCount() { return ad_id.length; } @Override public Object getItem(int position) { return ad_id[position]; } }

    Read the article

  • how to disappear keyboard onCreate Method?

    - by UMMA
    friends, i have a EditText on simple activity with a button. when every i move from one activity to this acivity focus is automatically set to EditText and keyboard appears in phone. i dont want to open keyboard untill i click on editText. can any one guide me what should i do? any help would be appriciated.

    Read the article

  • how to move scroll at the bottom of list Programmatically?

    - by UMMA
    dear friends, i after calling notifydatasetchanged(); i want to move scroll of list to the bottom of list so that user could see last record in the listview.actually i am writing Chat module so for that purpose i need latest record at the bottom of list. can any one guide me how to achieve this? any help would be appriciated.

    Read the article

  • how to use Android Spinner with text and value?

    - by UMMA
    dear friends, i want to use Android spinner with following data. Spinner will display only text data not code. code , text 1 , a 2, b 3,c . . . etc i have stored above comma seperated data in same activity class (Hard coded form) now if user selects "a" from the dropdown then it should get its code rather then text. can any one guide me how to achieve this? any help would be appriciated.

    Read the article

  • Android application not working on 1.5 firmware?

    - by UMMA
    dear friends, i have created a single page application of showing phonebook data in a list. i am using 2.1 sdk in emulator and application works fine. but in my HTC hero firmware is 1.5 when i try to intall same application on HTC hero application is installed successfully but when i click on app icon it gives me force close error even i have set minsdkversion property in manifest file to 3 here is the log Cat [2010-05-17 12:28:18 - AddressBook]Starting activity com.example.AddressBook.AddressBook on device [2010-05-17 12:28:19 - AddressBook]ActivityManager: Can't dispatch DDM chunk 46454154: no handler defined [2010-05-17 12:28:19 - AddressBook]ActivityManager: Can't dispatch DDM chunk 4d505251: no handler defined [2010-05-17 12:28:20 - AddressBook]ActivityManager: Starting: Intent { comp={com.example.AddressBook/com.example.AddressBook.AddressBook} } please help me out whats wrong? any help would be appriciated.

    Read the article

1 2  | Next Page >