Tagged Questions
0
votes
1answer
12 views
How to create a view in eclipse which contains SWT components?
I am trying to create a view in eclipse. I want my view to contain a Textfield and a button. the action is triggered by clicking on the button and some processing will be done on the inserted query in ...
1
vote
0answers
24 views
Are layout ids unique for a given application (project including its libraries) or just the given project?
Can view ids be passed into a library and be expected to point to the item in the non-library project containing the library? I have an adapter class which is going to be distributed to third party ...
1
vote
3answers
34 views
Change Layout when Thread finish
I want to change the layout when a thread ends, but I don't understand the bug; for example:
res/layout:
-mainView.xml
-threadView.xml
MainActivity.java
protected void firstThread() {
...
0
votes
1answer
48 views
A better way to use a null checked, type casted value?
I'm writing a library similar to AQuery but with a refined syntax for manipulating elements.
Essentially what AQuery does is safely access the view hierarchy and allow you to call subclass methods ...
0
votes
3answers
32 views
ImageButton not working within class
I am trying to create a test application that when I press an ImageButton, a log message appears. Simple.
I want the ImageButton view to work with a class.
I have done this as so:
UPDATED WITH ...
0
votes
1answer
47 views
Android findViewById argument cannot be resolved or is not a field
I'm following a tutorial about ArrayAdapter and I have this xml file named list_item.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
0
votes
1answer
20 views
ImageAdapter onClick goes wrong
I'm trying to set an onClick listener on my ImageView in the Adapter of my GridView. However, weird thing happens: The content of the onClick function affects also some other Views in my GridView.
...
0
votes
5answers
62 views
add view (text view) in AsyncTask
I used below code for add text view in Async task but :
07-26 11:40:39.302: E/AndroidRuntime(26715): Uncaught handler: thread AsyncTask #1 exiting due to uncaught exception
07-26 11:40:39.312: ...
0
votes
0answers
45 views
Android viewholder onclick updates more instances
For my android application i'm using the ViewHolder pattern.
Whenever i click on an imageview in my listview the row get updated but other rows are also getting updated.
Whenever i click the "like" ...
0
votes
1answer
36 views
Draw circle on ImageView at touched point
I am trying to draw circle on ImageView at touched point but it draws at left top corner.
My code is
ImageView imageView;
private static int RESULT_LOAD_IMAGE = 1;
Bitmap bmp;
float ...
1
vote
1answer
65 views
WindowManager with Animation (is it possible?)
Is there any way to inflate a view with WindowManager using Animation (at android's project)? I just can't do it even using the examples in sites! I used many examples but none worked!
public ...
0
votes
1answer
52 views
Android ListView not being repainted on scroll
This is best described with pictures. Before scrolling in my listview, everything looks fine:
After scrolling:
What could be causing this odd behavior? I am testing it on a Google Nexus running ...
2
votes
2answers
24 views
Android - define groups in R.id
Is there any possibility to group the R.id?
android:id="@+id/button1"
R.id.button1
I want something like this:
android:id="@+id/main/button1"
R.id.main.button1
But that does not work.
1
vote
1answer
79 views
getLocationOnScreen() vs getLocationInWindow()
What is the difference between screen and view in the context of these two methods?
I have a button and I want to get the x coordinate of its center.
I guess this would be enough:
public int ...
0
votes
1answer
22 views
how can I get the width of the visible area of the view?
I have a view which is bigger than the screen.
How can I get the width of its currently visible area?
getWidth() returns the absolut size.
0
votes
1answer
42 views
how can I finish activity from view
I have got an activity which has custom view.
I have to add activity result:
public class ActView extends Activity implements OnClickListener {
<...code...>
@Override
protected void ...
4
votes
3answers
65 views
IllegalArgumentException: width and height must be > 0 while loading Bitmap from View
I'm trying to draw on an ImageViewTouch, a library which enables pinch zooming. I'm able to draw over the image using Canvas, but when I zoom the image, the drawing disappears.
For this, I'm trying ...
1
vote
3answers
48 views
LinearLayout nesting
Is it possible to create a method that would inflate a layout (or create it dynamically), add specific views to it (in this case TextViews), then retun the layout as a view, so I could (somehow) ...
0
votes
1answer
21 views
How to anchor a view to the android soft keyboard
Simple question:
How can I anchor a view (specifically EditText) to the top of the soft keyboard when it shows?
I don't want to use adjustPan or adjustResize because I have views at the top of my ...
0
votes
1answer
51 views
Custom view with button in ArrayAdapter
I have defined a custom view (xml) for my ArrayAdapter for a ListView, which adds a Button. I'd like to create an OnClickListener for this Button per row, but without creating a custom adapter. Is ...
0
votes
2answers
55 views
Modify spinner's dropdown box programmatically
How can I programmatically change the Padding and TextSize of the items in the spinner's dropdown box?
I tried using XML but the padding and text size appears different on different screen sizes. I ...
1
vote
4answers
25 views
some doubts about model-view-controller
I'm trying to implement MVC in a small school project, but I'm having some small doubts, I hope somebody can help me:
1.- if I'm having 5 views, I think I need 5 models, one for each view, but do I ...
0
votes
0answers
17 views
How Android ObjectAnimator draw
How Android ObjectAnimator draw the objects, more specific how it draw the views on screen? and how I can intercept this? I already tried the onDraw and drawableStateChanged but it cannot called by ...
1
vote
2answers
45 views
Creating VIEW statement in Jooq
I am trying to create a view statement using Jooq, how could we do that?
Or do we have any other option?
Jooq version: 3.0.1
-1
votes
3answers
61 views
How do I apply a GestureListener to an EditText?
I found this code that shows how to create a GestureListener to listen for a double-tap, but I've been unable to figure out how to apply it to my EditText, so that the double-tap is only detected when ...
0
votes
1answer
30 views
Removing a dynamically created ViewGroup by dynamically created button
I am developing an android termostat app, and I have made a listing (in code) of a group of items. Therefore I dynamically add buttons. When the user clicks on one of these buttons, I want to have all ...
0
votes
2answers
33 views
How to remove return list view from parent linearlayout?
I have MainActivity and ListClassFile .
The MainActivity have Linearlayout(name is recordContent) component from XML.(using findviewById to get).
In ListClassFile file, I call setListHandler will ...
0
votes
2answers
60 views
Open Class extended from ViewPart in another
I'm writing a program in Java in eclipse.
I have two classes which extend from the super class ViewPart.
Now I want to open only one of the classes automatically (that means when I run the program) ...
0
votes
3answers
72 views
How to block or improve landscape view in Android application
I recently have published my app on the android market and am very. I have no errors and the app works fine. The only problem I have right now is that when the user tilts the screen to go into ...
1
vote
1answer
41 views
Synchronize Controller with View
i have a Java project made with mvc where my flux program is contained on the controller.
I'd like to know how i can synchronize my controller with my view because i suppose that if i need an input ...
0
votes
1answer
25 views
drawing a background element
Current problem is that I am running into framerate issues on my simple android game due to me having to drawing a background for the view every time onDraw() is called. I am currently having to draw ...
-2
votes
1answer
52 views
Java/Android: Change from one View (Intent) to another
Well, I was watching this tutorial:http://www.youtube.com/watch?v=9ew_Ajpqwqg#t=5m25s
Here you can see that he writes Intent i = new Intent......
But my app doesn't work like that :/
Here's my code
...
0
votes
0answers
29 views
How to load Facebook profile photo
I'm stuck on one problem... I try to load FB profile pic in Android:
// Request user data and show the results
Request.executeMeRequestAsync(session, new Request.GraphUserCallback()
...
2
votes
1answer
104 views
Is the listview recycling early? Or is Universal ImageLoader canceling in error? Or is my Logic wrong?
https://github.com/nostra13/Android-Universal-Image-Loader
It works beautifuly except for the very first item in a listview is having its image loading task canceled.
It says it Is called when image ...
0
votes
1answer
47 views
Someone knows if there is a git repo similar to evernote stack view for android? [closed]
I'm making an app for android and iOS and i was looking if someone can point me to a git repo or a sample code for simulating the stack view inside the Evernote app for iOS. I found a git repo to help ...
0
votes
1answer
39 views
NullPointerException when acting on a View
For some reason I'm getting a nullPointerException when working with any new View I place in my XML. The view type (TextView, EditText, etc) doesn't matter. Any views I originally had work - it's ...
1
vote
2answers
190 views
MVC - How to pass data from view to controller
I'm learning the MVC pattern right now and I have a short question concerning models and view. I have the following model:
class Person {
private String name;
private int age;
}
Now I want my ...
-6
votes
2answers
46 views
Creating a View with two Edittext's [closed]
to show 2 Edittexts in a AlertDialog I need to summarise them to one view. How is this possible or is this possible in general?
Has anyone an example?
0
votes
2answers
55 views
JPA and Table Views. Can it be done?
We currently have a Java EE system where we are mapping to our database using JPA. It is a fairly well developed system with about 20 entities.
We now have been ordered to use Views for everything. ...
6
votes
1answer
93 views
overriding the onScroll method of the com.android.View in android coding?
How can I override the onScroll method of the View in android? I using it for the view to prevent the update in the view's checkboxes while when I scroll. I use a two dimensional array for storing the ...
0
votes
1answer
48 views
JSF 2 can't find my xhml files
I have a web jsf project, with, inside my Web Pages directory:
/WEB-INF
/faces
/res
index.jsp
My faces dir got the files all.xhtml and login.xhtml.
My web.xml
<servlet-mapping>
...
0
votes
2answers
44 views
Is there a way to find all View.GONE elements on a page?
I have an android application where I'm hiding and showing different custom items on the page. Is there a way to loop through all the items on the page that are set to view.gone or am I going to have ...
4
votes
2answers
464 views
Error: Didn't find class android.view.menu (on path)
I'm trying to create a single menu item. When I run my app, it crashes right when it starts up and I get the following error in LogCat:
E/AndroidRuntime(1507): Caused by:
...
0
votes
2answers
74 views
ViewPager skip views on return leaving blank
I'm making an app with 4 main Views. I want that all of them stay on a LIST menu on top (That's ok for now).
Using Fragments, I have the ability to change the view without actualy going to other ...
0
votes
1answer
326 views
DialogFragment keeps displaying full screen (not in a dialog)
I have a DialogFragment which contains a WebView. I create an instance of the DialogFragmentwithin the activity and call the show method on it. Usually this displays it as a Dialog over the current ...
4
votes
2answers
97 views
Android: How to draw free on top of anything (any activity)
How do you draw a view on top of all other activities regardless of what they are showing and without using transparent activities or consuming its touch events.
Its like to display a custom icon on ...
1
vote
1answer
42 views
How to represent a legacy database using Hibernate?
I have the follow legacy database structure and content:
order parameter value
--------------------------------
1 user_login user
1 user_password 123456
1 user_level ...
0
votes
0answers
81 views
SQL view creation with prepared statements
I am having trouble generating views based on my code as follows:
final String[] clusterClasses = {"exponential", "linear", "periodic"};
java.sql.PreparedStatement pCreateViewStmt = ...
0
votes
0answers
39 views
CouchDB-Ektorp generatedView generates an empty list
I'm using the @GenerateView annotation to find all documents with a certain field.
This is my repository class:
public class EngineRepository extends CouchDbRepositorySupport<EngineLog> {
...
0
votes
0answers
122 views
Android GraphView resetData only updating the axis values not the graph itself
Hi I am currently having some real difficulty with the graphview library. I am trying to get the graph to update via a call from a broadcast receiver in the activity. But for some reason it only ...