Search Results

Search found 39486 results on 1580 pages for 'ubuntu for android'.

Page 8/1580 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Android fragments problems different layouts

    - by juan
    I have two layouts: one for portait with one container and another for landscape with two containers. In the first layout I show a fragment and when the user select one element, I replace the fragment with another (with FragmentTransation.Replace). <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" > <LinearLayout android:id="@+id/container1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" /> </RelativeLayout> In the second layout I want to show the two fragments at one time, one in the first container and the second in the second container. <LinearLayout 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:orientation="horizontal" > <LinearLayout android:id="@+id/container1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" android:orientation="vertical" /> <LinearLayout android:id="@+id/container2" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="7" android:orientation="vertical" /> </LinearLayout> But I can't make this works with configuration changes. I try use different names for containers, try add fragments when only bundle is null,... Someone have a working code of this case?

    Read the article

  • android.view.InflateException: Binary XML file line #11

    - by kostas
    i have a listview with some items.when the user touch the first list item it starts a dialog activity with a photo and some text below.that happens for every list item.but unfortunately i m getting this android.view.InflateException: Binary XML file line #11 force down error..this is a part of my manifest: <activity android:name=".kalamaki" android:label="Beaches in Chania" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.Dialog" /> this is my .xml file: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#cfcfcc" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:layout_marginTop="5px" android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@+id/image" /> <TextView android:layout_marginTop="5px" android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@+id/text" android:textColor="#262626" /> </LinearLayout> </ScrollView> and this is my logcat error: 04-30 19:08:34.433: ERROR/AndroidRuntime(405): Uncaught handler: thread main exiting due to uncaught exception 04-30 19:08:34.463: ERROR/AndroidRuntime(405): java.lang.RuntimeException: Unable to start activity ComponentInfo{kostas.menu.chania/kostas.menu.chania.sfinari}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown> 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2454) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.os.Handler.dispatchMessage(Handler.java:99) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.os.Looper.loop(Looper.java:123) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread.main(ActivityThread.java:4310) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at java.lang.reflect.Method.invokeNative(Native Method) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at java.lang.reflect.Method.invoke(Method.java:521) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at dalvik.system.NativeStart.main(Native Method) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown> 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.createView(LayoutInflater.java:513) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.inflate(LayoutInflater.java:407) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.Activity.setContentView(Activity.java:1622) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at kostas.menu.chania.sfinari.onCreate(sfinari.java:15) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): ... 11 more 04-30 19:08:34.463: ERROR/AndroidRuntime(405): Caused by: java.lang.reflect.InvocationTargetException 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.widget.ImageView.<init>(ImageView.java:105) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at java.lang.reflect.Constructor.constructNative(Native Method) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at java.lang.reflect.Constructor.newInstance(Constructor.java:446) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.view.LayoutInflater.createView(LayoutInflater.java:500) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): ... 23 more 04-30 19:08:34.463: ERROR/AndroidRuntime(405): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-mdpi/scrollbar_handle_vertical.9.png from drawable resource ID #0x7f050000 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.content.res.Resources.loadDrawable(Resources.java:1710) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.content.res.TypedArray.getDrawable(TypedArray.java:548) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.widget.ImageView.<init>(ImageView.java:115) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): ... 27 more 04-30 19:08:34.463: ERROR/AndroidRuntime(405): Caused by: java.io.FileNotFoundException: res/drawable-mdpi/scrollbar_handle_vertical.9.png 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.content.res.AssetManager.openNonAssetNative(Native Method) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.content.res.AssetManager.openNonAsset(AssetManager.java:391) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): at android.content.res.Resources.loadDrawable(Resources.java:1702) 04-30 19:08:34.463: ERROR/AndroidRuntime(405): ... 29 more

    Read the article

  • android layout images bad quality

    - by user1028269
    when I add images on layout it show in bad quality <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/sbackground" /> how to fix it? (I need to fix it only without programmatically) thanks

    Read the article

  • PagerView overlapping PagerTabStrip / PagerTitleStrip

    - by user1256169
    I've been trying for about a week to get my PagerView not to overlap the TitleStrip. I've tried absolutely everything I can think of, and one StackOverflow question that looked like the same question, had an answer that wasn't applicable. It appears that both the PagerTitleStrip and the TextView start at 0,0 (left,top) Any help would be appreciated. Note that I can't use any XML (inc Layout.xml) so it's all done programatically. Here's a full working example of my problem: package com.example.projname; import android.app.Activity; import android.os.Bundle; import android.support.v4.view.PagerAdapter; import android.support.v4.view.PagerTabStrip; import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.widget.TextView; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MyPagerAdapter myPagerAdapter = new MyPagerAdapter(); PagerTabStrip myPagerTabStrip = new PagerTabStrip(this); myPagerTabStrip.setGravity(Gravity.TOP); ViewPager viewPager = new ViewPager(this); viewPager.addView(myPagerTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); viewPager.setAdapter(myPagerAdapter); setContentView(viewPager); } class MyPagerAdapter extends PagerAdapter { public final String[] Titles = { "Title One", "Title Two", "Title Three", "Title Four", "Title Five" }; @Override public int getCount() { return Titles.length; } @Override public boolean isViewFromObject(View view, Object object) { return (view == object); } @Override public CharSequence getPageTitle(int position) { return Titles[position]; } @Override public Object instantiateItem(ViewGroup container, int position) { TextView textView = new TextView(getApplicationContext()); String myString = new String("Page " + (position + 1) + "\r\n"); textView.setText(myString + myString + myString + myString + myString + myString); container.addView(textView); return textView; } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) object); } } } Edit: Adding a screenshot of the problem:

    Read the article

  • Diagnose PC Hardware Problems with an Ubuntu Live CD

    - by Trevor Bekolay
    So your PC randomly shuts down or gives you the blue screen of death, but you can’t figure out what’s wrong. The problem could be bad memory or hardware related, and thankfully the Ubuntu Live CD has some tools to help you figure it out. Test your RAM with memtest86+ RAM problems are difficult to diagnose—they can range from annoying program crashes, or crippling reboot loops. Even if you’re not having problems, when you install new RAM it’s a good idea to thoroughly test it. The Ubuntu Live CD includes a tool called Memtest86+ that will do just that—test your computer’s RAM! Unlike many of the Live CD tools that we’ve looked at so far, Memtest86+ has to be run outside of a graphical Ubuntu session. Fortunately, it only takes a few keystrokes. Note: If you used UNetbootin to create an Ubuntu flash drive, then memtest86+ will not be available. We recommend using the Universal USB Installer from Pendrivelinux instead (persistence is possible with Universal USB Installer, but not mandatory). Boot up your computer with a Ubuntu Live CD or USB drive. You will be greeted with this screen: Use the down arrow key to select the Test memory option and hit Enter. Memtest86+ will immediately start testing your RAM. If you suspect that a certain part of memory is the problem, you can select certain portions of memory by pressing “c” and changing that option. You can also select specific tests to run. However, the default settings of Memtest86+ will exhaustively test your memory, so we recommend leaving the settings alone. Memtest86+ will run a variety of tests that can take some time to complete, so start it running before you go to bed to give it adequate time. Test your CPU with cpuburn Random shutdowns – especially when doing computationally intensive tasks – can be a sign of a faulty CPU, power supply, or cooling system. A utility called cpuburn can help you determine if one of these pieces of hardware is the problem. Note: cpuburn is designed to stress test your computer – it will run it fast and cause the CPU to heat up, which may exacerbate small problems that otherwise would be minor. It is a powerful diagnostic tool, but should be used with caution. Boot up your computer with a Ubuntu Live CD or USB drive, and choose to run Ubuntu from the CD or USB drive. When the desktop environment loads up, open the Synaptic Package Manager by clicking on the System menu in the top-left of the screen, then selecting Administration, and then Synaptic Package Manager. Cpuburn is in the universe repository. To enable the universe repository, click on Settings in the menu at the top, and then Repositories. Add a checkmark in the box labeled “Community-maintained Open Source software (universe)”. Click close. In the main Synaptic window, click the Reload button. After the package list has reloaded and the search index has been rebuilt, enter “cpuburn” in the Quick search text box. Click the checkbox in the left column, and select Mark for Installation. Click the Apply button near the top of the window. As cpuburn installs, it will caution you about the possible dangers of its use. Assuming you wish to take the risk (and if your computer is randomly restarting constantly, it’s probably worth it), open a terminal window by clicking on the Applications menu in the top-left of the screen and then selection Applications > Terminal. Cpuburn includes a number of tools to test different types of CPUs. If your CPU is more than six years old, see the full list; for modern AMD CPUs, use the terminal command burnK7 and for modern Intel processors, use the terminal command burnP6 Our processor is an Intel, so we ran burnP6. Once it started up, it immediately pushed the CPU up to 99.7% total usage, according to the Linux utility “top”. If your computer is having a CPU, power supply, or cooling problem, then your computer is likely to shutdown within ten or fifteen minutes. Because of the strain this program puts on your computer, we don’t recommend leaving it running overnight – if there’s a problem, it should crop up relatively quickly. Cpuburn’s tools, including burnP6, have no interface; once they start running, they will start driving your CPU until you stop them. To stop a program like burnP6, press Ctrl+C in the terminal window that is running the program. Conclusion The Ubuntu Live CD provides two great testing tools to diagnose a tricky computer problem, or to stress test a new computer. While they are advanced tools that should be used with caution, they’re extremely useful and easy enough that anyone can use them. Similar Articles Productive Geek Tips Reset Your Ubuntu Password Easily from the Live CDCreate a Persistent Bootable Ubuntu USB Flash DriveAdding extra Repositories on UbuntuHow to Share folders with your Ubuntu Virtual Machine (guest)Building a New Computer – Part 3: Setting it Up TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Have Fun Editing Photo Editing with Citrify Outlook Connector Upgrade Error Gadfly is a cool Twitter/Silverlight app Enable DreamScene in Windows 7 Microsoft’s “How Do I ?” Videos Home Networks – How do they look like & the problems they cause

    Read the article

  • I can't save my settings in Ubuntu One client in windows7

    - by user209470
    I have Ubuntu 12.04 at home and windows7 at work. I sync Documents between them with Ubuntu One. In W7 I can't set/save the settings. In syncdaemon-exceptions.log there is error: File "ubuntuone\syncdaemon\config.pyc", line 317, in save exceptions.IOError: [Errno 2] No such file or directory: 'C:\\Users\\F\xc3\xb6ldi Ferenc\\AppData\\Local\\ubuntuone\\syncdaemon.conf.new' The directory is exist. The file is not. The W7 language is Hungarian.

    Read the article

  • Upgrading Ubuntu 9.04 to 9.10 when Update Manager doesn't let you

    - by nickf
    I've been trying to upgrade my installation of Ubuntu 9.04 to 9.10, but all of the instructions I've found haven't been helping. They mostly say to run the update manager and it'll tell you that there's a new distribution ready. Well, mine doesn't say that. Things I've run or checked: update-manager -d says: Your system is up-to-date The package information was last updated less than one hour ago. I've set it to get all new distributions, not just LTS $ cat /etc/update-manager/release-upgrades [DEFAULT] # default prompting behavior, valid options: # never - never prompt for a new distribution version # normal - prompt if a new version of the distribution is available # lts - prompt only if a LTS version of the distribution is available Prompt=normal I'm definitely running 9.04 $ lsb_release -r Distributor ID: Ubuntu Description: Ubuntu 9.04 Release: 9.04 Codename: jaunty Even running the release upgrade from console doesn't help: $ sudo do-release-upgrade Checking for a new ubuntu release No new release found This is running from behind a proxy, but I've set it up such that the regular upgrades and apt-get etc doesn't complain. (export http_proxy=http://myuser:mypass@myserver:8080/) Could you think of anything else which might be stopping me from upgrading?

    Read the article

  • handling various frame layouts in android

    - by vaibhav
    i'm new to game development and am trying create a Contra or the old tmnt game (but a simple one) like game for android. for the game i decided to divide my main screen in three parts - upper for stats,mid for the game and lower for controls. my main.xml is <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <FrameLayout android:id="@+id/upper_bar" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" > </FrameLayout> <FrameLayout android:id="@+id/fl" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="0.5" > </FrameLayout> <FrameLayout android:id="@+id/low_bar" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="0.85" > </FrameLayout> </LinearLayout> so i have created the gameview and gameloopthread classes for the mid surface(which is pretty standard). my problem is that how do i draw in the upper and lower frame layouts? should i make new classes for view and thread for each layout , should i do all this in the gameview class itself or is there any better way to implement this?

    Read the article

  • imageview weights in linearlayout

    - by Metalex
    I have this layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:minWidth="100dp" > <TextView android:id="@+id/txt_what_way" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="4" android:textAppearance="?android:attr/textAppearanceMedium" /> <LinearLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="3"> <ImageView android:layout_width="20dp" android:layout_height="20dp" android:scaleType="fitCenter" android:src="@drawable/ic_launcher"/> </LinearLayout> <LinearLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="3"> <ImageView android:layout_width="20dp" android:layout_height="20dp" android:scaleType="fitCenter" android:src="@drawable/ic_launcher"/> </LinearLayout> </LinearLayout> I want that it looks like: TextView - 40% of width, Layout with ImageView - 30% of widht, Layout with ImageView - 30% of width. But the output is: TextViewImageViewImageView----------------free space---------------------------------- Thanks for your help! -- EDITED Done it in programmatic way

    Read the article

  • Change or Reset Windows Password from a Ubuntu Live CD

    - by Trevor Bekolay
    If you can’t log in even after trying your twelve passwords, or you’ve inherited a computer complete with password-protected profiles, worry not – you don’t have to do a fresh install of Windows. We’ll show you how to change or reset your Windows password from a Ubuntu Live CD. This method works for all of the NT-based version of Windows – anything from Windows 2000 and later, basically. And yes, that includes Windows 7. You’ll need a Ubuntu 9.10 Live CD, or a bootable Ubuntu 9.10 Flash Drive. If you don’t have one, or have forgotten how to boot from the flash drive, check out our article on creating a bootable Ubuntu 9.10 flash drive. The program that lets us manipulate Windows passwords is called chntpw. The steps to install it are different in 32-bit and 64-bit versions of Ubuntu. Installation: 32-bit Open up Synaptic Package Manager by clicking on System at the top of the screen, expanding the Administration section, and clicking on Synaptic Package Manager. chntpw is found in the universe repository. Repositories are a way for Ubuntu to group software together so that users are able to choose if they want to use only completely open source software maintained by Ubuntu developers, or branch out and use software with different licenses and maintainers. To enable software from the universe repository, click on Settings > Repositories in the Synaptic window. Add a checkmark beside the box labeled “Community-maintained Open Source software (universe)” and then click close. When you change the repositories you are selecting software from, you have to reload the list of available software. In the main Synaptic window, click on the Reload button. The software lists will be downloaded. Once downloaded, Synaptic must rebuild its search index. The label over the text field by the Search button will read “Rebuilding search index.” When it reads “Quick search,” type chntpw in the text field. The package will show up in the list. Click on the checkbox near the chntpw name. Click on Mark for Installation. chntpw won’t actually be installed until you apply the changes you’ve made, so click on the Apply button in the Synaptic window now. You will be prompted to accept the changes. Click Apply. The changes should be applied quickly. When they’re done, click Close. chntpw is now installed! You can close Synaptic Package Manager. Skip to the section titled Using chntpw to reset your password. Installation: 64-bit The version of chntpw available in Ubuntu’s universe repository will not work properly on a 64-bit machine. Fortunately, a patched version exists in Debian’s Unstable branch, so let’s download it from there and install it manually. Open Firefox. Whether it’s your preferred browser or not, it’s very readily accessible in the Ubuntu Live CD environment, so it will be the easiest to use. There’s a shortcut to Firefox in the top panel. Navigate to http://packages.debian.org/sid/amd64/chntpw/download and download the latest version of chntpw for 64-bit machines. Note: In most cases it would be best to add the Debian Unstable branch to a package manager, but since the Live CD environment will revert to its original state once you reboot, it’ll be faster to just download the .deb file. Save the .deb file to the default location. You can close Firefox if desired. Open a terminal window by clicking on Applications at the top-left of the screen, expanding the Accessories folder, and clicking on Terminal. In the terminal window, enter the following text, hitting enter after each line: cd Downloadssudo dpkg –i chntpw* chntpw will now be installed. Using chntpw to reset your password Before running chntpw, you will have to mount the hard drive that contains your Windows installation. In most cases, Ubuntu 9.10 makes this simple. Click on Places at the top-left of the screen. If your Windows drive is easily identifiable – usually by its size – then left click on it. If it is not obvious, then click on Computer and check out each hard drive until you find the correct one. The correct hard drive will have the WINDOWS folder in it. When you find it, make a note of the drive’s label that appears in the menu bar of the file browser. If you don’t already have one open, start a terminal window by going to Applications > Accessories > Terminal. In the terminal window, enter the commands cd /medials pressing enter after each line. You should see one or more strings of text appear; one of those strings should correspond with the string that appeared in the title bar of the file browser earlier. Change to that directory by entering the command cd <hard drive label> Since the hard drive label will be very annoying to type in, you can use a shortcut by typing in the first few letters or numbers of the drive label (capitalization matters) and pressing the Tab key. It will automatically complete the rest of the string (if those first few letters or numbers are unique). We want to switch to a certain Windows directory. Enter the command: cd WINDOWS/system32/config/ Again, you can use tab-completion to speed up entering this command. To change or reset the administrator password, enter: sudo chntpw SAM SAM is the file that contains your Windows registry. You will see some text appear, including a list of all of the users on your system. At the bottom of the terminal window, you should see a prompt that begins with “User Edit Menu:” and offers four choices. We recommend that you clear the password to blank (you can always set a new password in Windows once you log in). To do this, enter “1” and then “y” to confirm. If you would like to change the password instead, enter “2”, then your desired password, and finally “y” to confirm. If you would like to reset or change the password of a user other than the administrator, enter: sudo chntpw –u <username> SAM From here, you can follow the same steps as before: enter “1” to reset the password to blank, or “2” to change it to a value you provide. And that’s it! Conclusion chntpw is a very useful utility provided for free by the open source community. It may make you think twice about how secure the Windows login system is, but knowing how to use chntpw can save your tail if your memory fails you two or eight times! Similar Articles Productive Geek Tips Reset Your Ubuntu Password Easily from the Live CDChange Your Forgotten Windows Password with the Linux System Rescue CDHow to Create and Use a Password Reset Disk in Windows Vista & Windows 7Reset Your Forgotten Password the Easy Way Using the Ultimate Boot CD for WindowsHow to install Spotify in Ubuntu 9.10 using Wine TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Add a Custom Title in IE using Spybot or Spyware Blaster When You Need to Hail a Taxi in NYC Live Map of Marine Traffic NoSquint Remembers Site Specific Zoom Levels (Firefox) New Firefox release 3.6.3 fixes 1 Critical bug Dark Side of the Moon (8-bit)

    Read the article

  • Problem restarting my Ubuntu system

    - by VoY
    Whenever I try to restart my Ubuntu either from the command line by typing reboot or in GNOME the computer goes from X to console, starts the shutdown process and then a message saying "[ some number ] Starting new kernel" appears on the screen and the computer goes back to X login screen. I suspect this must have something to do with nvidia drivers, because it seemed to have appeared around the time I bought a new graphic card. Also, when I reboot the second time I see weird graphical artifacts on the screen. When I boot from ubuntu live cd I can reboot just fine. I used jaunty, recently I switched to karmic with no change. This bug is very annoying, because I have to hard reset my computer in order to reboot. Also not good for the filesystems, I suspect. Can you suggest a way to debug the cause or if not at least the easiest way to go about reinstalling ubuntu without losing customizations/settings/data?

    Read the article

  • Why is 1px sometimes 2px when specified in Android XML?

    - by Daniel Lew
    I've got a desire for a one-pixel divider line, just for looks. I thought I could accomplish this using a View of height 1px, with a defined background. However, I'm getting some very odd behavior on different devices - sometimes the 1px ends up as 2px. Take this sample layout for example: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> <View android:layout_width="fill_parent" android:layout_height="1px" android:background="@android:color/white" android:layout_marginBottom="4dp" /> </LinearLayout> When run on my G1, this comes out fine. But on the Nexus One, it alternates between 1px lines and 2px lines. Does anyone know where this is going awry? Why does Android sometimes make 1px into 2px?

    Read the article

  • What is wrong with this layout? Android

    - by kellogs
    Hi, I am trying to accomplish a view like this: left side = live camera preview, right side = a column of 4 images. But all that I managed with the following xml was a fullscreen live camera preview. Android 1.5 emulator. Thanks <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <proto.wiinkme.SurfaceViewEx android:id="@+id/preview" android:layout_height="fill_parent" android:layout_width="wrap_content" android:layout_alignParentLeft="true" android:layout_weight="3"/> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/preview" android:layout_alignParentRight="true" android:layout_weight="1"> <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/mother_earth" android:src="@drawable/mother_earth_show" /> <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/meadow" android:src="@drawable/meadow_show" /> <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/trap" android:src="@drawable/trap_show" /> <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/whistle" android:src="@drawable/whistle_show" /> </LinearLayout> </RelativeLayout>

    Read the article

  • Android custom xml widget

    - by DrogoNevets
    I have an XML file in my layout folder that has how i want my custom widget/view (not sure what correct terminology is here). but how do i make it so that i can programatically, add one or more to an activity the xml file is as follows <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/viewLog"> <TextView android:id="@+id/viewLogClimbName" android:layout_width="fill_parent" android:singleLine="true" android:ellipsize="end" android:gravity="left" /> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/viewLogDate" android:layout_width="fill_parent" android:singleLine="true" android:ellipsize="end" android:gravity="left" /> <TextView android:id="@+id/viewLogStyle" android:layout_width="fill_parent" android:singleLine="true" android:ellipsize="end" android:gravity="left" /> </LinearLayout> <TextView android:id="@+id/viewLogDetails" android:layout_width="fill_parent" android:layout_height="fill_parent" android:ellipsize="end" android:gravity="left" android:layout_weight="1" /> </LinearLayout> </LinearLayout> I have looked at the android how-to and dont really understand what its getting at

    Read the article

  • phablet-flash aborting while installing Ubuntu Touch on Nexus 4

    - by Till B
    I have a Nexus 4 with Android 4.3 installed and I want to flash it to Ubuntu Touch. My system is Ubuntu 12.04, running inside a virtual machine on Mac OS 10.5.8. To use the VM, I opened an NAT bridge and forwarded port 5037 for adb, I can see the Nexus with adb and e.g. use the adb shell into it. USB ports are also forwarded to the VM. I follow these instructions to the letter. My bootloader is unlocked, just as it was described in the instructions. Now I encounter different issues, when executing sudo phablet-flash ubuntu-system --no-backup. On the first run, it got stuck in this state: INFO:phablet-flash:Decompressing partitions/recovery.img from /home/till/Downloads/phablet-flash/imageupdates/pool/device-5ba3031cb0d6fc624848266edba781e3e821b6e1e8dd21105725f0ab26077d0a.tar.xz INFO:phablet-flash:Restarting device... wait INFO:phablet-flash:Restarting device... wait complete INFO:phablet-flash:Booting /tmp/tmpMSN8bm/partitions/recovery.img < waiting for device > downloading 'boot.img'... OKAY [ 1.772s] booting... OKAY [ 0.005s] finished. total time: 1.779s INFO:phablet-flash:Waiting for recovery image to boot The following happened: around the line "INFO:phablet-flash: Restarting...", it rebooted into the bootloader. The bootloader shows only for two seconds, then the screen goes off and the phone stays off. But I do notice, that the screen is not off - it is just black, but the background light is on. If I wait long enough, phablet-flash aborts with ERROR:phablet-flash:Wait for recovery expired On the second try, I wanted to manually start the bootloader and choose "Recovery mode". Pressing "volume down+power" at first did nothing. Releasing the buttons and then pressing them again brought me into the bootloder. After choosing "Recovery mode", phablet-flash continued and after a while aborted with the following output: INFO:phablet-flash:Wait for recovery image to boot complete INFO:phablet-flash:Clearing /data and /cache INFO:phablet-flash:Pushing /home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz to /cache/recovery/ failed to copy '/home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz' to '/cache/recovery/': Permission denied ERROR:phablet-flash:Command 'adb push /home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz /cache/recovery/' returned non-zero exit status 1 Removing directory /tmp/tmpDnbz6N Removing directory /tmp/tmpth4L6w What can I do to properly flash my phone with Ubuntu Touch? I noticed that adb does not show the phone in recovery mode: Typing adb devices, when the Nexus 4 is in recovery mode, shows the serial number and the state device, where it should show recovery. Should the phone be rooted? This is not mentioned in the instructions.

    Read the article

  • [android] How to center buttons on screen horizontally and vertically plus equidistant apart?

    - by marc
    I've been racking my brain (android newbie here, so not hard to do) for awhile trying to figure out how to accomplish this: Desired Layout using a RelativeLayout or something other than AbsoluteLayout which is what this was created with. I'm coming from a Windows programming background where the device adjusts the 'absolute' positioning for you and GUI layout was a non-issue. The first layout works great in the emulator, but doesn't format for my Nexus One or any other screen that differs from the emulator size. I expected this because it's absolutely positioned, but haven't found a solution that will format correctly for different screen sizes. My goal is to have the layout work for different screen sizes and in portrait / landscape. Here's the Code that I'm currently using: [main.xml] <?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <Button android:id="@+id/Button01" android:layout_width="188px" android:layout_height="100px" android:text="A" android:layout_y="50px" android:layout_x="65px" android:textSize="48sp"/> <Button android:id="@+id/Button02" android:layout_width="188px" android:layout_height="100px" android:text="B" android:layout_y="175px" android:layout_x="65px" android:textSize="48sp"/> <Button android:id="@+id/Button03" android:layout_width="188px" android:layout_height="100px" android:text="C" android:layout_y="300px" android:layout_x="65px" android:textSize="48sp"/> </AbsoluteLayout> Using tidbits from other questions here, I came up with this, it’s closer, but not there yet. <?xml version="1.0" encoding="utf-8"?> <TableLayout android:gravity="center" android:id="@+id/widget49" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android" > <Button android:id="@+id/Button01" android:layout_width="0dip" android:layout_weight="1" android:text="A" android:textSize="48sp"/> <Button android:id="@+id/Button02" android:layout_width="0dip" android:layout_weight="1" android:text="B" android:textSize="48sp"/> <Button android:id="@+id/Button03" android:layout_width="0dip" android:layout_weight="1" android:text="C" android:textSize="48sp"/> </TableLayout> Here’s a picture of the TableLayout: Another Attempt Any help / guidance would be greatly appreciated.

    Read the article

  • Specifying Android project dependencies (in Eclipse)

    - by Henrik Gustafsson
    I have two Android projects, a 'library project' containing a custom layout, and an 'application project' containing an application which uses the layout. Everything seems to build and execute fine, except that the visual layout editor throws a ClassNotFoundException (which I assume is a bug in the plug-in), but when I try to start to make use of the attributes I defined for the custom layout in the xml, I can no longer build. That is; this works: <?xml version="1.0" encoding="utf-8"?> <se.fnord.android.layout.PredicateLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="asdfasdf" /> </se.fnord.android.layout.PredicateLayout> Whereas this does not: <?xml version="1.0" encoding="utf-8"?> <se.fnord.android.layout.PredicateLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:fnord="http://schemas.android.com/apk/res/se.fnord.android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView fnord:layout_horizontalSpacing="1px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="asdfasdf" /> </se.fnord.android.layout.PredicateLayout> The build fails with a message from aapt: ERROR No resource identifier found for attribute 'layout_horizontalSpacing' in package 'se.fnord.android' The resource identifier does exist in the R-file and attrs.xml contained the library project, and if I put the layout code and resources directly in the application project everything works fine. The layout_horizontalSpacing attribute (and layout_verticalSpacing) is a custom attribute used in the PredicateLayout.LayoutParam class to specify the distance to the next widget. So far I've tried the standard eclipse ways by specifying project references and build path project dependencies. I was also told to try the tag in the application manifest, which did not help. So, what do I need to do for the references in the xml-file to work? I don't know if it's relevant, but the 'library' manifest looks like this: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="se.fnord.android" android:versionCode="1" android:versionName="1.0.0"> </manifest> The 'application' manifest like this: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="se.fnord.appname" android:versionCode="1" android:versionName="1.0.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".AppName" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> (The 'PredicateLayout', btw, is a cleaned-up version of this).

    Read the article

  • custom listview adapter getView method being called multiple times, and in no coherent order

    - by edzillion
    I have a custom list adapter: class ResultsListAdapter extends ArrayAdapter<RecordItem> { in the overridden 'getView' method I do a print to check what position is and whether it is a convertView or not: @Override public View getView(int position, View convertView, ViewGroup parent) { System.out.println("getView " + position + " " + convertView); The output of this (when the list is first displayed, no user input as yet) 04-11 16:24:05.860: INFO/System.out(681): getView 0 null 04-11 16:24:29.020: INFO/System.out(681): getView 1 android.widget.RelativeLayout@43d415d8 04-11 16:25:48.070: INFO/System.out(681): getView 2 android.widget.RelativeLayout@43d415d8 04-11 16:25:49.110: INFO/System.out(681): getView 3 android.widget.RelativeLayout@43d415d8 04-11 16:25:49.710: INFO/System.out(681): getView 0 android.widget.RelativeLayout@43d415d8 04-11 16:25:50.251: INFO/System.out(681): getView 1 null 04-11 16:26:01.300: INFO/System.out(681): getView 2 null 04-11 16:26:02.020: INFO/System.out(681): getView 3 null 04-11 16:28:28.091: INFO/System.out(681): getView 0 null 04-11 16:37:46.180: INFO/System.out(681): getView 1 android.widget.RelativeLayout@43cff8f0 04-11 16:37:47.091: INFO/System.out(681): getView 2 android.widget.RelativeLayout@43cff8f0 04-11 16:37:47.730: INFO/System.out(681): getView 3 android.widget.RelativeLayout@43cff8f0 AFAIK, though I couldn't find it stated explicitly, getView() is only called for visible rows. Since my app starts with four visible rows at least the position numbers cycling from 0-3 makes sense. But the rest is a mess: Why is getview called for each row four times? Where are these convertViews coming from when I haven't scrolled yet? I did a bit of reseach, and without getting a good answer, I did notice that people were associating this issue with layout issues. So in case, here's the layout that contains the list: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/pageDetails" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawSelectorOnTop="false" /> </LinearLayout> and the layout of each individual row: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="108dp" android:padding="4dp"> <ImageView android:id="@+id/thumb" android:layout_width="120dp" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginRight="8dp" android:src="@drawable/loading" /> <TextView android:id="@+id/price" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_toRightOf="@id/thumb" android:layout_alignParentBottom="true" android:singleLine="true" /> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:paddingRight="4dp" android:singleLine="true" /> <TextView android:id="@+id/title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="17dp" android:layout_toRightOf="@id/thumb" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:paddingRight="4dp" android:layout_alignWithParentIfMissing="true" android:gravity="center" /> Thank you for your time

    Read the article

  • Bring the Whole Ubuntu Gang Home to Your Desktop with this Mascots Wallpaper

    - by Asian Angel
    This wonderful wallpaper features all of the Ubuntu Mascots together as stuffed animals and will make a perfect addition to your Ubuntu desktop. Ubuntu Wallpaper [via Web Upd8] Latest Features How-To Geek ETC Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions Access and Manage Your Ubuntu One Account in Chrome and Iron Mouse Over YouTube Previews YouTube Videos in Chrome Watch a Machine Get Upgraded from MS-DOS to Windows 7 [Video] Bring the Whole Ubuntu Gang Home to Your Desktop with this Mascots Wallpaper Hack Apart a Highlighter to Create UV-Reactive Flowers [Science] Add a “Textmate Style” Lightweight Text Editor with Dropbox Syncing to Chrome and Iron

    Read the article

  • Ubuntu 10.04 server, problems installing the desktop

    - by ILMV
    Hi all, I have just setup two servers running 10.04 server and have installed the ubuntu-desktop as follows: sudo apt-get install ubuntu-desktop The problem is even though it says it has installed it will not auto-start... I've tried this: sudo mv /etc/init/gdm.conf /etc/init/gdm.disabled sudo mv /etc/init/gdm.disabled /etc/init/gdm.conf To enable/disable it but still not joy. Any ideas? Thanks, Ben

    Read the article

  • How to Share Files Online with Ubuntu One

    - by Chris Hoffman
    Ubuntu One, Ubuntu’s built-in cloud file storage service, allows you to make files publically available online or share them privately with others. You can share files over the Internet right from Ubuntu’s file browser. Ubuntu One has two file-sharing methods: Publish, which makes a file publically available on the web to anyone who knows its address, and Share, which shares a folder with other Ubuntu One users. HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me? HTG Explains: How Windows 8′s Secure Boot Feature Works & What It Means for Linux

    Read the article

  • phpmyadmin login should not expire on ubuntu 10.04

    - by mit
    On ubuntu 10.04 the phpmyadmin config is a little bit scattered. I want to set the loginexpiration time to zero, should never expire, this is a secured setup behind a firewall. I think it is 3600 by default but cannot find the setting. Where is it? Edit: I actually changed it in /etc/phpmyadmin/conf.inc.php which seems the recommended place for ubuntu. The other files mentioned below might be overwritten on updates.

    Read the article

  • Access to my files on Android

    - by user18644
    I am thinking of subscribing to Dropbox which is slightly more costly than Ubuntu one but I need access to my files on the go, and I prefer to use my smartphone to my netbook most of the time as I like to travel light. I do not want to stream music, I want access to my files only. Whereas there is a free app for Dropbox to access said files, there isn't one for Ubuntu. I would be prepared to wait a while if you have got this in hand, have you actually given this any thought? Please tell me whether I should ignore Ubuntu One and link up with Dropbox?

    Read the article

  • My android app crash before load main.xml

    - by Saverio Puccia
    my android app crash before load main.xml. This is the exception thrown java.lang.RuntimeException: Unable to resume activity...: java.lang.NullPointerException What happens? For completeness I enclose my manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="saverio.puccia.nfcauth" android:versionCode="1" android:versionName="1.0" > //permission <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.NFC"></uses-permission> <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission> //main declaration <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".NFCAuthActivity" android:label="@string/app_name" > //intent filter declaration <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.NDEF_DISCOVER" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> </manifest> LOGCAT 06-25 11:03:23.670: E/AndroidRuntime(4323): FATAL EXCEPTION: main 06-25 11:03:23.670: E/AndroidRuntime(4323): java.lang.RuntimeException: Unable to resume activity {saverio.puccia.nfcauth/saverio.puccia.nfcauth.NFCAuthActivity}: java.lang.NullPointerException 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2456) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2484) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1998) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.access$600(ActivityThread.java:127) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.os.Handler.dispatchMessage(Handler.java:99) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.os.Looper.loop(Looper.java:137) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.main(ActivityThread.java:4507) 06-25 11:03:23.670: E/AndroidRuntime(4323): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 11:03:23.670: E/AndroidRuntime(4323): at java.lang.reflect.Method.invoke(Method.java:511) 06-25 11:03:23.670: E/AndroidRuntime(4323): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 06-25 11:03:23.670: E/AndroidRuntime(4323): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 06-25 11:03:23.670: E/AndroidRuntime(4323): at dalvik.system.NativeStart.main(Native Method) 06-25 11:03:23.670: E/AndroidRuntime(4323): Caused by: java.lang.NullPointerException 06-25 11:03:23.670: E/AndroidRuntime(4323): at saverio.puccia.nfcauth.NFCAuthActivity.onResume(NFCAuthActivity.java:103) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1157) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.Activity.performResume(Activity.java:4539) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2446) 06-25 11:03:23.670: E/AndroidRuntime(4323): ... 12 more 06-25 11:03:23.670: W/ActivityManager(1998): Force finishing activity r.intent.getComponent().flattenToShortString()

    Read the article

  • Android ActivityGroup

    - by Vahag Vardanyan
    I know that ActivityGroup is in the "past", but I want to learn how to use it. So I write a simple TabHost, and want to show different activities using ActivityGroup. Here are the parts of code Player.java package player.org; import android.app.Activity; import android.app.TabActivity; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.media.MediaPlayer; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.ProgressBar; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TabHost; import android.widget.TabWidget; import android.widget.TextView; public class Player extends TabActivity { /** Called when the activity is first created. */ private MediaPlayer media=null; private SeekBar progress; private View play; private Progress p; TabHost tabhost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tabs); Resources res=getResources(); //TabHost tabhost=(TabHost) findViewById(R.id.tabhost); // tabhost.setup(); tabhost=getTabHost(); TabHost.TabSpec spec; Intent intent; intent=new Intent(this,Progress.class); spec=tabhost.newTabSpec("now playing").setIndicator("Now playing", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); intent=new Intent(this,Group.class); spec=tabhost.newTabSpec("all_songs").setIndicator("All songs", res.getDrawable(R.drawable.songs)) .setContent(intent); tabhost.addTab(spec); //intent=new Intent(this,Progress.class); spec=tabhost.newTabSpec("artists").setIndicator("Artists", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); spec=tabhost.newTabSpec("alboom").setIndicator("Alboom", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); tabhost.setCurrentTab(0); } } Group.java import android.os.Bundle; import android.view.View; public class Group extends ActivityGroup { @Override public void onCreate(Bundle savedInstanceStated) { super.onCreate(savedInstanceStated); View view = getLocalActivityManager().startActivity("AllSongs", new Intent(this, AllSongs.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); setContentView(view); } AllSongs.java package player.org; import java.util.ArrayList; import android.R.id; import android.app.ActivityGroup; import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TabHost; public class AllSongs extends ListActivity{ ArrayList<String> listItem=new ArrayList<String>(); ArrayAdapter<String> adapter; ListView listView; //Player p; TabHost tab; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //p=new Player(); adapter=new ArrayAdapter<String>(this,R.layout.list_item,listItem); setListAdapter(adapter); listView=getListView(); listView.setTextFilterEnabled(true); listView.setOnItemClickListener(listener); addItem("vahag"); addItem("vahagvahag"); } private OnItemClickListener listener=new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Intent intent = new Intent(AllSongs.this,Progress.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Group group= (Group) getParent(); View view=group.getLocalActivityManager().startActivity("Progress",intent).getDecorView(); setContentView(view); } }; public void addItem(String s) { listItem.add(s); adapter.notifyDataSetChanged(); } } and the Progress.java package player.org; import android.app.Activity; import android.app.ActivityGroup; import android.app.Dialog; import android.app.TabActivity; import android.content.Context; public class Progress extends Activity { // Called when the activity is first created. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } So, AllSongs.java try to change current activity with Progress activity, but when I press on list item, the Programm forsed closed, and logChat says "08-17 12:49:26.471: ERROR/AndroidRuntime(1500): java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'" I can't figure how to fix this problem, Can anyone helps?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >