 |
 |
Hello Group
Now, I have a problem with a collection IList<>
My project use Web Service and the IList<> is fill with a web service, but when I try to delete one Item on IList<>, I get the error: Error Collection is of a fixed size. I have tried to fix this problem but I still can not. I need help !!!
namespace MobileApplication
{
public partial class ListaCriteriosAdapter : BaseAdapter<Criterio>
{
IList<Criterio> ListaCriterios;
private Context activity;
private LayoutInflater MiInflanter;
MobileService.MobileService Query = new MobileService.MobileService();
public ListaCriteriosAdapter(Context context, IList<Criterio> MiLista)
{
this.activity = context;
ListaCriterios = MiLista;
MiInflanter = (LayoutInflater)activity.GetSystemService(Context.LayoutInflaterService);
}
public override int Count
{
get { return ListaCriterios.Count; }
}
public override long GetItemId(int position)
{
return position;
}
public override Criterio this[int position]
{
get { return ListaCriterios[position]; }
}
public override View GetView(int position, View convertView, ViewGroup parent)
{
ContactsViewHolder Holder = null;
ImageView btnDelete;
if (convertView == null)
{
convertView = MiInflanter.Inflate(Resource.Layout.ListViewCriterios, null);
Holder = new ContactsViewHolder();
Holder.txtFolio = convertView.FindViewById<TextView>(Resource.Id.TVFolioListaCriterios);
Holder.txtCriterio = convertView.FindViewById<TextView>(Resource.Id.TVCriterioListaCriterios);
Holder.txtTipo = convertView.FindViewById<TextView>(Resource.Id.TVTipoListaCriterios);
btnDelete = convertView.FindViewById<ImageView>(Resource.Id.BTNBorrarCriterio);
btnDelete.Click += (object sender, EventArgs e) =>
{
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
AlertDialog Confirm = builder.Create();
Confirm.SetTitle("Confirmar");
Confirm.SetMessage("Estas seguro de eliminarlo?");
Confirm.SetButton("Aceptar", (s, ev) =>
{
var Temp = (int)((sender as ImageView).Tag);
int id = (Int32)ListaCriterios[Temp].IdCriterio;
ListaCriterios.RemoveAt(Temp);
EliminarCriterioPP((Int32)id);
NotifyDataSetChanged();
});
Confirm.Show();
};
convertView.Tag = Holder;
btnDelete.Tag = position;
}
else
{
btnDelete = convertView.FindViewById<ImageView>(Resource.Id.BTNBorrarCriterio);
Holder = convertView.Tag as ContactsViewHolder;
btnDelete.Tag = position;
}
Holder.txtFolio.Text = ListaCriterios[position].IdCriterio.ToString();
Holder.txtCriterio.Text = ListaCriterios[position].DescripcionCriterio.ToString();
Holder.txtTipo.Text = ListaCriterios[position].DescripcionGrafico;
NotifyDataSetChanged();
return convertView;
}
public class ContactsViewHolder : Java.Lang.Object
{
public TextView txtFolio { get; set; }
public TextView txtCriterio { get; set; }
public TextView txtTipo { get; set; }
}
private void EliminarCriterioPP(int Id)
{
Query.EliminarCriterioPPCompleted += Query_EliminarCriterioPPCompleted;
Query.EliminarCriterioPPAsync(Id);
}
void Query_EliminarCriterioPPCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
Toast.MakeText(activity, "Fue eliminado correctamente", ToastLength.Short).Show();
}
}
}
|
|
|
|
 |
It means that the underlying object (MiLista) is not a pure IList
|
|
|
|
 |
The MiLista parameter is a fixed size list - most likely an array.
You'll need to convert the parameter to a standard list. You can either do that unconditionally:
public ListaCriteriosAdapter(Context context, IEnumerable<Criterio> MiLista)
{
this.activity = context;
ListaCriterios = new List<Criterio>(MiLista);
MiInflanter = (LayoutInflater)activity.GetSystemService(Context.LayoutInflaterService);
}
Or, you can test the parameter to see if you need to convert it:
private static bool IsReadOnlyOrFixedSize<T>(IList<T> list)
{
if (list.IsReadOnly) return true;
var nonGenericList = list as System.Collections.IList;
return nonGenericList != null && nonGenericList.IsFixedSize;
}
public ListaCriteriosAdapter(Context context, IList<Criterio> MiLista)
{
if (IsReadOnlyOrFixedSize(MiLista))
{
MyLista = new List<Criterio>(MyLista);
}
this.activity = context;
ListaCriterios = MiLista;
MiInflanter = (LayoutInflater)activity.GetSystemService(Context.LayoutInflaterService);
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Good evening
I have implemented an application with auto update function. When I release new version on my server then application downloads new .apk and it starts an intent to install new .apk file.
I want to change this procedure, if it's possible. Before installing new version, I want that application should be able to uninstall itself.
How can I do?
Now I'm thinking to remove all file in Android system's folder reserved to this application, but is it a good way? What can you sugest me?
Thank you.
|
|
|
|
 |
Quote: I have implemented an application with auto update function. When I release new version on my server then application downloads new .apk and it starts an intent to install new .apk file. That is required.
How about, you keep all of the business logic on your server side and just show the results on the Android application? This way, you won't have to push every fix to the Android application but merely the new features only.
Quote: Before installing new version, I want that application should be able to uninstall itself. That is done by default, your previous application is removed by the Google Play Store and then the latest version is installed. But if your application uninstalls itself then I am not sure, Google Play Store would be happy to install the new version of the application, without user intervention. It would require the user to go to Play Store and install the latest version themselves.
Quote: Now I'm thinking to remove all file in Android system's folder reserved to this application, but is it a good way? Of course, if the data is no longer of user, remove it.
Anyways, have a look here, there is way, where you can download the APK related content later, but that is just for the applications where the content is above 100 MB. APK Expansion Files | Android Developers[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
Thank you for repaly. Last days I have made some tests. Now I can recal new intent to unistal my application, after downloading and storing new version in Download folder.
I have found the routine to send Intent for installing the new version.
Here is the code for this two procedures:
Uri packageURI = Uri.parse("package:com.example.nameapp");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
startActivityForResult(uninstallIntent, PICK_CONTACT_UPDATE);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + nomeApp)), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
But when application executes unistallation, it is arrested and it cant't execute the install procedure (loading II intent).
How can I execute II intent after unistallation? Is it possible? How can I do?
|
|
|
|
 |
Hi,everyone!!!!Can anyone tell me,or better show me ,how can I retrieve my contacts, shown into a list and when the user clicks on a contact to make a call????Please help.It is very important!!!!Everything i find is a bit old and doesnt work!Thank you all!!!!
|
|
|
|
 |
Sorry, but this site does not provide code to order. You need to Google for samples and tutorials, or you could always try Android Developers[^].
|
|
|
|
 |
Thank you very much for your reply,im a bit newbie and i have already do thiw but seems a bit confusing!
|
|
|
|
 |
Member 12751865 wrote: i have already do thiw but seems a bit confusing! So what help do you need? Please be specific about your problem, otherwise we do not know how to help you.
|
|
|
|
 |
Obviusly i didnt make it with that way...so i need more help in that project fully or partly...Never mind,I m going to find a way to do this.Thank you for your help!
|
|
|
|
 |
I'm seeing four things here: 1) retrieve my contacts, 2) shown into a list, 3) respond to a click, 4) make a call. Stop looking at the larger picture and break it down into more manageable parts. Which of these specifically do you need help with?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
Dear friend,
unfortunatelly i can not deal with any of these isues!If you have something on mind,pleaze help me,wherever you can.Thanks a lot for your kind response!!!
|
|
|
|
 |
Member 12751865 wrote:
unfortunatelly i can not deal with any of these isues! So then exactly what are you doing here? This is, after all, a site for developer types.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
I have developed an application in the Cordova Framework, and I have added a camera plugin for capture functionality.
I am getting an Information Leakage flaw in the code below
OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri);
try {
bitmap.compress(Bitmap.CompressFormat.JPEG, this.mQuality, os);
os.close();
} finally {
if (os != null) {
os.close();
}
}
|
|
|
|
 |
Member 12358097 wrote: ...Information Leakage flaw...
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
Is that a runtime exception or a compile-time? Can you share the exception name too?
Information leakage flaw is unclear. Share the error message, precise error message.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
 here is the complete description by vera code,
Associated Flaws by CWE ID:
Information Exposure Through Sent Data (CWE ID 201)(5 flaws)
Description
Sensitive information may be exposed as a result of outbound network connections made by the application. This can manifest in a couple of different ways.
In C/C++ applications, sometimes the developer fails to zero out a buffer before populating it with data. This can cause information leakage if, for example, the buffer contains a data structure for which only certain fields were populated. The uninitialized fields would contain whatever data is present at that memory location. Sensitive information from previously allocated variables could then be leaked when the buffer is sent over the network.
Mobile applications may also transmit sensitive information such as email or SMS messages, address book entries, GPS location data, and anything else that can be accessed by the mobile API. This behavior is common in mobile spyware applications designed to exfiltrate data to a listening post or other data collection point. This flaw is categorized as low severity because it only impacts confidentiality, not integrity or availability. However, in the context of a mobile application, the significance of an information leak may be much greater, especially if misaligned with user expectations or data privacy policies.
Effort to Fix: 2 - Implementation error. Fix is approx. 6-50 lines of code. 1 day to fix.
Recommendations
In C/C++ applications, ensure that all struct elements are initialized or zeroed before being sent. In mobile applications, ensure that the transfer of sensitive data is intended and that it does not violate application security policy or user expectations.
|
|
|
|
 |
That is the sort of detail that every developer is expected to understand; it just means that you need to be careful when handling sensitive data. And the solution will vary according to the structure of your actual application.
|
|
|
|
 |
i understand and looking for solution.
if anyone can suggest i tried using try resource but no luck its giving same warning.
|
|
|
|
 |
 here is the complete code ,
Bitmap bitmap = null;
Uri uri = null;
if (destType == FILE_URI || destType == NATIVE_URI) {
if (this.saveToPhotoAlbum) {
Uri inputUri = getUriFromMediaStore();
try {
uri = Uri.fromFile(new File(FileHelper.getRealPath(inputUri, this.cordova)));
} catch (NullPointerException e) {
uri = null;
}
} else {
uri = Uri.fromFile(new File(getTempDirectoryPath(), System.currentTimeMillis() + ".jpg"));
}
if (uri == null) {
this.failPicture("Error capturing image - no media storage found.");
return;
}
if (this.targetHeight == -1 && this.targetWidth == -1 && this.mQuality == 100 &&
!this.correctOrientation) {
writeUncompressedImage(uri);
this.callbackContext.success(uri.toString());
} else {
bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
if (rotate != 0 && this.correctOrientation) {
bitmap = getRotatedBitmap(rotate, bitmap, exif);
}
try (OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri)) {
bitmap.compress(Bitmap.CompressFormat.JPEG, this.mQuality, os);
}
i tried using try resource but no luck still getting warning:
try (OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri))
|
|
|
|
 |
The message is telling you to look at the information you are transferring and take steps to keep it secure. If it does not need to be secured then you can ignore the warnings. If it does, then you need to use some form of encryption to protect it.
|
|
|
|
 |
even i understand that but the issue is whats need to be done for this one line of code which is throwing warning , i can find inception point of warning and that is Uri .
what can we do with object( Uri uri) i am still way of finding solution.
try resource seems not be working.
Anyway thanks bro
|
|
|
|
 |
The same answer as I have already given you.
|
|
|
|
 |
The past night, using my android phone, I have noticed the small voice of the Holy Spirit warning of a curse or other danger... Investigating to find it, through night vision the phone was a spotlight. Visually there was red dot barely visible in the corner. It was flashing a pattern..... The red color of an IR targeting laser, or multimode fiber laser meaning it was near infrared.
For now I have used electrical tape. But how can I access "INFRARED EMITTER" via an app.. What is his purpose on the phone to begin with. Why does it flash a pattern when it cannot be seen but through intention.
|
|
|
|
 |
You need to stop smoking that stuff.
|
|
|
|
 |
I notice you have not explain why the infrared emitter is there, or even deny it.
You just say I'm a weirdo for caring (apparently)
|
|
|
|
 |
No, I just have no idea what you are talking about.
|
|
|
|
 |
Richard MacCutchan wrote: I just have no idea what you are talking about.
So instead of ignoring the question which you did not understand, you get aggresive and make an condescending remark (because you did not understand something).. With voices like these companies become stagnant, because people are afraid to make a new idea.
|
|
|
|
 |
Member 12717761 wrote: you get aggresive and make an condescending remark I was not in any way aggressive, I merely joked that your question sounded like it was posted by someone on drugs. If you have a proper technical question then please post proper technical details, and people will try to help you.
|
|
|
|
 |
 well i tried to brief my question but people here are more interested in attacking personally then discussing issues
here i put some more code to make users understand the issue,
Bitmap bitmap = null;
Uri uri = null;
if (destType == FILE_URI || destType == NATIVE_URI) {
if (this.saveToPhotoAlbum) {
Uri inputUri = getUriFromMediaStore();
try {
uri = Uri.fromFile(new File(FileHelper.getRealPath(inputUri, this.cordova)));
} catch (NullPointerException e) {
uri = null;
}
} else {
uri = Uri.fromFile(new File(getTempDirectoryPath(), System.currentTimeMillis() + ".jpg"));
}
if (uri == null) {
this.failPicture("Error capturing image - no media storage found.");
return;
}
if (this.targetHeight == -1 && this.targetWidth == -1 && this.mQuality == 100 &&
!this.correctOrientation) {
writeUncompressedImage(uri);
this.callbackContext.success(uri.toString());
} else {
bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
if (rotate != 0 && this.correctOrientation) {
bitmap = getRotatedBitmap(rotate, bitmap, exif);
}
try (OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri)) {
bitmap.compress(Bitmap.CompressFormat.JPEG, this.mQuality, os);
}
|
|
|
|
 |
Well we cannot understand unless you tell us what the problem is.
|
|
|
|
 |
I have dont android development from quite some time, developed few projects.
I want to increase my knowledge, pleade recommend me some advance books on android
Thanks!
PS : I am not so confident in Broadcast Receivers and Services
|
|
|
|
|
 |
Member 11828365 wrote: I want to increase my knowledge... Develop more projects.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
 |
Good evening
I want to realize multipages application. I have to use a slide menu (in left side); all page are reached by item in this menu and it should be visible in all pages.
In this moment I have realized slide menu in main application: an Activity, I have to implement the other pages but I don't know how to do it.
What is the best practice, in this case? Should the other pages be realized like subActivity starting them by StartActivityForResult? Or is it better starting them as indipendent pages whit StartActivity? In last case I must relicate the slide menu...
Thank you very much.
|
|
|
|
 |
What do you mean by the term, "realize"? Does that mean to develop?
Creating this feature from scratch won't be a good idea, as you would have to handle many events such as drag events (for the drawer). What you need to use is, a Navigation Drawer activity. Navigation drawer supports the features that you need to use. That is how you see the applications to be working in Android with this feature. Android manages showing the list view of the drawer using the z-index in the application and the rest of the stuff would be managed by Android too, like showing the content, changing which layout or content to show etc.
For more on this, please go through, Creating a Navigation Drawer | Android Developers[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
I am able to make a bluetooth connection with a GNSS Device, but the problem is that, i am not able to stay connected with the device or in keeping the connection alive with the device in my entire application.
|
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
you could keep connection in a global manager instead of a activity, you can refer to this
|
|
|
|
 |
How and where are you establishing said connection? What are you doing in methods like onPause(), onStop(), and onDestroy()?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
Here is the solution to keep the connection alive across the entire app :-
AsyncTask.execute(new Runnable() {
@Override
public void run() {
try {
bluetoothSocket = Globals.bluetoothDevice.createRfcommSocketToServiceRecord(Globals.DEFAULT_SPP_UUID);
bluetoothSocket.connect();
} catch (IOException e) {
e.printStackTrace();
}
no need to use those methods.
|
|
|
|
 |
 When you are Selecting A device to connect and when you are click on the device list item for requesting a connection to the device use AsyncTask
and put the connect method inside the AsyncTask like this :-
AsyncTask.execute(new Runnable() {
@Override
public void run() {
try {
bluetoothSocket = Globals.bluetoothDevice.createRfcommSocketToServiceRecord(Globals.DEFAULT_SPP_UUID);
bluetoothSocket.connect();
// After successful connect you can open InputStream
} catch (IOException e) {
e.printStackTrace();
}
Here is the full code for the same problem that i have cracked :-
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView parent, View view, int position, long id) {
lablelexconnected.setText("Connecting ...");
bdDevice = arrayListBluetoothDevices.get(position);
//bdClass = arrayListBluetoothDevices.get(position)
// Toast.makeText(getApplicationContext()," " + bdDevice.getAddress(),Toast.LENGTH_SHORT).show();
Log.i("Log", "The dvice : " + bdDevice.toString());
bdDevice = bluetoothAdapter.getRemoteDevice(bdDevice.getAddress());
Globals.bluetoothDevice = bluetoothAdapter.getRemoteDevice(bdDevice.getAddress());
System.out.println("Device in GPS Settings : " + bdDevice);
// startService(new Intent(getApplicationContext(),MyService.class));
/* Intent i = new Intent(GpsSettings.this, MyService.class);
startService(i);*/
// finish();
// connectDevice();
AsyncTask.execute(new Runnable() {
@Override
public void run() {
try {
bluetoothSocket = Globals.bluetoothDevice.createRfcommSocketToServiceRecord(Globals.DEFAULT_SPP_UUID);
bluetoothSocket.connect();
// After successful connect you can open InputStream
InputStream in = null;
in = bluetoothSocket.getInputStream();
InputStreamReader isr = new InputStreamReader(in);
br = new BufferedReader(isr);
while (found == 0) {
String nmeaMessage = br.readLine();
Log.d("NMEA", nmeaMessage);
// parse NMEA messages
sentence = nmeaMessage;
System.out.println("Sentence : " + sentence);
if (sentence.startsWith("$GPRMC")) {
String[] strValues = sentence.split(",");
System.out.println("StrValues : " + strValues[3] + " " + strValues[5] + " " + strValues[8]);
if (strValues[3].equals("") && strValues[5].equals("") && strValues[8].equals("")) {
Toast.makeText(getApplicationContext(), "Location Not Found !!! ", Toast.LENGTH_SHORT).show();
} else {
latitude = Double.parseDouble(strValues[3]);
if (strValues[4].charAt(0) == 'S') {
latitude = -latitude;
}
longitude = Double.parseDouble(strValues[5]);
if (strValues[6].charAt(0) == 'W') {
longitude = -longitude;
}
course = Double.parseDouble(strValues[8]);
// Toast.makeText(getApplicationContext(), "latitude=" + latitude + " ; longitude=" + longitude + " ; course = " + course, Toast.LENGTH_SHORT).show();
System.out.println("latitude=" + latitude + " ; longitude=" + longitude + " ; course = " + course);
// found = 1;
NMEAToDecimalConverter(latitude, longitude);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
});
}
});
BDW Richard MacCutchan this is my another account. I have solved My Problem.
modified 14-Sep-16 5:52am.
|
|
|
|
 |
I have problem with layout in my application. I'm using list view and I have defined a custom list row. The program is correctly executed, but layout has some problem.
The space between two consecutive row is excessive...
This is XML code that I use in application layout (main) "activityMain.xml"
="1.0" ="utf-8"
<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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<TextView android:text="No contents" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView" />
<ListView
android:id="@+id/listView_InfoOnLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:background="@drawable/bkgreen"
android:layout_marginTop="15dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="false"
android:footerDividersEnabled="false"
android:layout_alignParentEnd="true"
android:divider="@null"
android:dividerHeight="5dp"
android:layout_alignParentStart="true"
android:scrollIndicators="right"
android:clickable="true" />
</RelativeLayout>
and this is the custm row in XML resource ("list_row.xml")
="1.0" ="utf-8"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="90dip"
android:background="@drawable/bkglavander"
android:orientation="vertical"
android:padding="5dip" >
<!-- ListRow Left sied Image -->
<LinearLayout android:id="@+id/thumbnail"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="80dip"
android:padding="3dip"
android:layout_alignParentLeft="true"
android:background="@drawable/bkgorange"
android:layout_marginRight="5dip">
<ImageView
android:id="@+id/imaginiRSS"
android:layout_width="50dip"
android:layout_height="60dip"
android:src="@drawable/bkgblack"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true">
<!-- Title Of rss-->
<TextView
android:id="@+id/titoliRSS"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=". TITLE"
android:textColor="#ff00aa00"
android:typeface="sans"
android:textSize="20dip"
android:layout_marginRight="5dip"
android:layout_marginLeft="5dip"
android:textStyle="bold"/>
<!-- Link -->
<TextView
android:id="@+id/linksRSS"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/titoliRSS"
android:gravity="right"
android:text=". LINK"
android:layout_marginRight="5dip"
android:layout_marginLeft="5dip"
android:textSize="12dip"
android:textColor="#ff0000ff"
android:textStyle="bold"/>
<!-- Description -->
<TextView
android:id="@+id/descrizioniRSS"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/titoliRSS"
android:textColor="#343434"
android:textSize="15dip"
android:layout_marginRight="5dip"
android:layout_marginLeft="5dip"
android:layout_marginTop="1dip"
android:text=". DESC." />
</LinearLayout>
</LinearLayout>
</LinearLayout>
What is wrong, please?
|
|
|
|
 |
Andy_Bell wrote: android:layout_height="90dip" Have you considered values other than 90?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
Yes of course. Reducing this value I can restrict row (defined in "list_row.xml") but the problem remain: space between 2 line remains the same.
I think it's like the problem is in ListView and not in the custom row.....
|
|
|
|
 |
A picture would help.
You have a bunch of extra stuff on each of those widgets, both files. I would suggest trimming away everything that is not 100% necessary and then build them back up until the problem reappears.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
 |
Good evening.
I try to download picture form url and insert in Image View. I use this code to do it:
public Bitmap getBitmapFromURL(String src) {
Bitmap myBitmap = null;
try {
java.net.URL url = new java.net.URL(src);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
myBitmap = BitmapFactory.decodeStream(input);
return myBitmap;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
I just want to ask you, there is problem to do so, or is it inefficient?
Closing this application, remains the downloaded picture remains in memory?
If I want to free memory resource, how can I cancel this files (accumulated in time)?
|
|
|
|