Android :: How To Create A Transparent Activity Programmatically?
Jul 28, 2010
I want to launch an Activity with a webView as its content from current Activity. This new activity needs to be transparent and webview should be in the center. I looked around the web but only solutions I found were using style xmls. I want to do it using pure code i.e. no xml declarations. if anybody has come across this then please shed some light.
View 1 Replies
Feb 1, 2010
I want to create transparent create on another activity.
How can I achieve this?
View 3 Replies
View Related
Mar 19, 2009
I have a 2D app. When the user presses a button, I need to quickly open a translucent 3D animation and overlay that on top of the 2D app. This is similar to the "Translucent GLSurfaceView" demo in APIDemo.
However, with APIDemo on G1, it takes about 100~200ms for the new Activity to come up. For me, this is too long. Is there any way to make it faster (to about 30~60ms).
My idea is to create a transparent Window object that contains a SurfaceView and hide it. When user presses button, the Window is shown.
View 2 Replies
View Related
Jul 27, 2010
I have a transparent listview with a image as background. Now, i want the scrollbar as transparent too, i.e I must be able to see the background image through this scrollbar too.
View 2 Replies
View Related
Mar 22, 2010
How to create a transparent textview on click at the bottom of the running screen.
View 2 Replies
View Related
Apr 22, 2010
My use case is writing an overlay controller activity for a landscape camera preview. I followed the instructions from a couple of tutorials for writing a transparent theme.When I start this activity from my root activity, the layout gets drawn correctly, but the background stays black. I tried to use @android:style/Theme.Translucent instead, but this Theme inherits the orientation from the calling activity (landscape) and thats not what I want.The application holding the camera preview is set to landscape view as it does not display the preview correctly in portrait orientation. (see old google bug report)What I wanted to do was to put an independent activity for user interaction interface in front of the camera surface holder (this activity should be set to 'portrait', or even better to 'sensor')
View 3 Replies
View Related
Nov 1, 2010
I'm trying to create table row and place 3 elements: EditText - EditText - ImageButton as following:................
View 2 Replies
View Related
Aug 10, 2009
I want to create an XML file to Store my Application Settings into. ( I can't use SharedPrefs because i want that Settings file later to be accessed by Some other Code.)
I can easily create an XML with java's code and store it in File too. but in Android I can create xml with the same java code but can't save it into the file coz they have removed the package javax.xml.transform from SDK.
I am Attaching the Java code here...
CODE:....................
View 2 Replies
View Related
Sep 15, 2010
I am new in Android. whats the wrong with the following code:
CODE:.................
View 2 Replies
View Related
Nov 22, 2010
I know how to create Open/WEP/PSK/PSK2 configuration programmatically.
CODE:...........
But how do I create one for '802.1x EAP'?
Looking into the source code at:
CODE:..............
Seems to do the work but 'config.eap' is not accessable from my application.
Is there a way to configure EAP types or is it not possible?
View 1 Replies
View Related
Mar 5, 2010
Is it possible to programmatically create and/or destroy AppWidgets?
View 7 Replies
View Related
Jul 17, 2010
Is there a way i can create a view and add some textviews into it ? programmatically ? any sample code?
View 2 Replies
View Related
Apr 17, 2010
I need some help with the following scenario, as I am so used to make all of my layouts with XML, but now I have a situation where that won't work.
I am working on the second version of my app that delivers news, in the comments section I used to use a listview to display user comments, but it doesn't work that great for comments that could be anywhere from 5 to 500+ characters long. So I want to create a whole bunch of TextViews in a scrollview and stack them below each other.
My best guess was this, although it is definitely wrong because it only shows one comment. I assume I have to use some kind of LayoutParams and so I've looked into it but am still not sure how exactly to use them.
View 8 Replies
View Related
May 6, 2010
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 ...
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.
View 2 Replies
View Related
Oct 28, 2010
How to create a folder in main screen programmatically?
View 5 Replies
View Related
Jul 21, 2009
In ApiDemo, there is a progressBar demo. It creates a horizontal progress bar with a xml.
<ProgressBar android:id="@+id/progress_horizontal" style="?android:attr/progressBarStyleHorizontal" android:layout_width="200dip" android:layout_height="wrap_content" android:max="100" android:progress="50" android:secondaryProgress="75" />
But how to create one programmatically? If just new ProgressBar(fContext), it is Default ProgressBar style.
View 2 Replies
View Related
Mar 2, 2010
Does Android have a "best practices" guideline on creating & populating the db/tables programmatically vs. deploying a .db file in assets?
What are the pros/cons of both approaches?
I have a db with big long strings in several columns, and about 50 rows, so writing the insert statements alone would take quite some space. It seems a waste.
View 2 Replies
View Related
Sep 27, 2010
I have an xml layout that will display a grid made up of textviews within tablerows. The textview names are cell00, cell01, etc. At runtime, my program will determine which cell needs to be changed.
Is there a way get format a name so that it can be passed to the findViewById method at runtime? For example, if cell00 is needed, how can I generate the parm in this code?
TextView currcell = (TextView) findViewById(R.id.cell00)
Something like "cell"+00 doesn't compile because the findViewById method doesn't accept a String type. I don't want have every textview name in the grid hardcoded in the program - there must be a better way.
View 3 Replies
View Related
Oct 7, 2011
public class SamActivity extends Activity
{
private Paint mPaint;
private MaskFilter mEmboss;
private MaskFilter mBlur;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
[code].....
This is my code.In this i draw a line over the image.Now i want to know how to create button programatically?
View 1 Replies
View Related
Apr 27, 2010
When a TabWidget is using intents to designate the target Activity for each tab, is there any special handling of those Activities on the Activity Stack outside of the default operation? For Instance, if my app has tabs A, B, and C, and I click them in this order--A, B, A, C, A, B--how will the Activity stack change? My understanding of the default operation, if startActivity() is called each time on the intent, would have the Stack keep loading up new instances of the activities: A, AB, ABA, ABAC, ABACA, ABACAB It's hard to believe that's how it works though... Seems like it would be a waste of resources and could be endless. Can anyone tell me how this will actually work?
View 2 Replies
View Related
Aug 19, 2009
seems pretty straightforward.
CODE:..............
But doesn't work!
It scrunches the layout background as the background to each button, I want it to span all three buttons...
View 2 Replies
View Related
Mar 21, 2010
After I do some change in my database, that involves significant change in my views, I would like to redraw, re-execute on Create. How is that possible?
View 4 Replies
View Related
Aug 11, 2010
I know it's possible, but I can't figure out a way to trigger an update of my widget from the main activity. Isn't there some general intent I can broadcast?
View 1 Replies
View Related
Nov 11, 2010
What happens here is I call the crop image activity and then the camera activity runs in background. When I finish this activity, the camera is still alive at the background. So how can I kill programmatic the camera activity running in background?
View 3 Replies
View Related
Jul 9, 2010
I have already found how can I do an ImageButton with Transparent background, but I would like to ask, how can I set the effective of it ?
How can I do it more transparent ?
My way as I do it: <gradient android:startColor="#aaffffff" android:endColor="#aaffffff" ...>
What should I write in to the color to be more transparent ?
View 3 Replies
View Related
Dec 24, 2012
I am working on developing an app and I am not sure when should I use a new activity and when should I update the existing view.
For example, lets say I have a view that shows a multiple choice question.Now, when the user selects his choices and clicks on say "Evaluate", I want to show the same question view but along with the right answers and explanations for each option. So does that mean, I should send an Intent upon a click on Evaluate or I should just update the view (i am not sure how)?
If I send an intent and show a new screen, how can the user go back to the next question without displaying the answers? If I don't create an new activity, how can I update the existing view that is already displayed?
View 4 Replies
View Related
Mar 17, 2010
Here's my use case: The app starts at a login screen. You enter your credentials and hit the "Login" button. Then a progress dialog appears and you wait for some stuff to download. Once the stuff has downloaded, you are taken to a new activity. Exactly which activity you are taken to depends on the server response.
Here's my problem: If you go HOME during this login/download process, at some point in the near future your download will complete and will invoke startActivity(). So then the new activity will be pushed to the foreground, rudely interrupting the user. I can't start the activity before I start the download, because, as I mentioned earlier, the activity I start depends on the result of the download.
I would obviously not like to interrupt the user like this. One way to solve this is to refrain from calling startActivity() until the user returns to the app. I can do this by keeping track of the LoginActivity's onStop() and onRestart(). But I'm wondering, is there any way to create the activity while it is in the background? That way the user returns to the app and he is ready to go. otherwise he would have to wait for the new activity to be created (which could take some time because the new activity also has to download and display some data). Update: Guess what? I LIED! I could have sworn that starting this activity was causing it to come to the foreground, but I went back to test it again and the problem has magically disappeared. I tested in both 1.6 and 2.0.1 and both OSes were smart enough not to bring a backgrounded task to the front.
View 2 Replies
View Related
Nov 9, 2009
Once upon a time (Android 1.5 and earlier), when you would create a new project using the "android create project" command, it worked well -- you had an app that could immediately be compiled and installed.
Now, though, when you run that command, a number of places need fixing up, where ACTIVITY_NAME shows up instead of the activity name specified...depending on the API level you target.
For example:
CODE:............
leaves ACTIVITY_NAME in:
CODE:..........
If I change the target to 1, 3, or 4, it works as expected. If I have the target as 2 or 5, it gives me the ACTIVITY_NAME.
So, I'm curious to know if:
a. This is a bug, or
b. I'm missing something (despite this example coming straight from the docs), or
c. I've lost my marbles
View 2 Replies
View Related
Sep 11, 2010
I've gone through a few guides and tutorials, and they're quite clear on how to start an activity (with intent). However, how do I create a new activity in Eclipse? I can probably do this by hand by then I have to modify the R file which is auto-generated. I can create a new XML layout.
View 3 Replies
View Related
Nov 2, 2010
I'm trying to create a ExpandableListView in one activity. I've looked in apis demos, and I've created ExpandableListView. The problem is, that I need to have this ExpandableListView in activity that is already created, and not in a new one.
I've used this code:
CODE:..............
View 3 Replies
View Related