Search Results

Search found 17655 results on 707 pages for 'android compat lib'.

Page 1/707 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to install compat-drivers or compat-wireless

    - by Sasho
    Could someone please explain me in detail how to install some of this drivers. I am running Ubuntu 12.04.2 and have the infamous (as I see everywhere in the net) problem with Atheros AR9462 wifi card. I tried everything to fix it and compat drivers are the only solution that I haven't tried. I tried to install some random package from kernel.org site and it couldn't make the driver (it threw some error). Then I updated the kernel to 3.10-rc7 and downloaded the last release of compat drivers and again the same problem occured. I reinstalled Ubuntu 12.04.2 and now I am using the 3.5 kernel because I don't know if rc7 is stable version. So my question is which compat wireless or compat drivers to download for this kernel and what is the process of installing. I tried with some command from the repository and it returned that it's not found. PS I am new to Ubuntu and Linux in general so explaining at length the install process and which driver I should install would be appreciated.

    Read the article

  • jenkins-maven-android when running throwing the error "android-sdk-linux/platforms" is not a directory"

    - by Sam
    I start setting up the jenkins-maven-android and i'm facing an issue when running the jenkin job. My Machine Details $uname -a Linux development2 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:19:02 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Steps to install the Android SDK in Ubuntu https://help.ubuntu.com/community/AndroidSDK since i'm working on headless env (ssh to client machine) i used following command to install the platform tools android update sdk --no-ui download apache maven and install on http://maven.apache.org/download.html mvn -version output root@development2:/opt/android-sdk-linux/tools# mvn -version Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000) Maven home: /opt/apache-maven-3.0.4 Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.0.0-12-virtual", arch: "amd64", family: "unix" root@development2:/opt/android-sdk-linux/tools# ran the following two command as mention in below sudo apt-get update sudo apt-get install ia32-libs Problems with Eclipse and Android SDK http://developer.android.com/sdk/installing/index.html As error suggest i gave the path to android SDK in jenkins build config still im getting the error clean install -Dandroid.sdk.path=/opt/android-sdk-linux Can someone help me to resolve this. Thanks Error I'm Getting Waiting for Jenkins to finish collecting data mavenExecutionResult exceptions not empty message : Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project base-template: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. cause : Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project base-template: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) at hudson.maven.Maven3Builder.call(Maven3Builder.java:64) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 27 more Caused by: com.jayway.maven.plugins.android.InvalidSdkException: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. at com.jayway.maven.plugins.android.AndroidSdk.assertPathIsDirectory(AndroidSdk.java:125) at com.jayway.maven.plugins.android.AndroidSdk.getPlatformDirectories(AndroidSdk.java:285) at com.jayway.maven.plugins.android.AndroidSdk.findAvailablePlatforms(AndroidSdk.java:260) at com.jayway.maven.plugins.android.AndroidSdk.<init>(AndroidSdk.java:80) at com.jayway.maven.plugins.android.AbstractAndroidMojo.getAndroidSdk(AbstractAndroidMojo.java:844) at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:329) at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:102) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 28 more channel stopped Finished: FAILURE* android home Echo root@development2:~# echo $ANDROID_HOME /opt/android-sdk-linux

    Read the article

  • How Do I make my own keyboard for an app in android

    - by Ephraim
    I am currently working on an app, that requires a keyboard in a different language (Specifically Hebrew), the problem is, that I don't know where to begin. I don't want the user to have to go onto an app store, and install a separate app that has more languages in it just to use my app, and, I only want the keyboard to be available in my app, ie, it shouldn't effect anything outside my specific app. the way I am doing it right now, is to create it as part of the main layout, and just make it visible whenever the user clicks on the Edit Text. the problem with this, is I can't get the size of it to readjust. I had originally tried using 2 different layouts (one in the res/layout folder, and one in the res/layout-lnd folder), but this caused different problems in my app, making it slower. so I am wondering 2 things, either of which should work. one: how would I create the layout for the keyboard to readjust. or Two: how would I make a keyboard correctly. here is the xml code that I am useing specifically partaining to the keyboard: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:visibility="gone" android:background="@color/puzzle_dark" android:id="@+id/hebrwKeyboardView" android:layout_width="fill_parent" android:layout_height="146dip" android:layout_gravity="right|center_vertical|center_horizontal|bottom" android:fitsSystemWindows="true" android:clipChildren="false" android:orientation="vertical" > <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="145dip" android:clipChildren="false" android:layout_gravity="center_vertical|center_horizontal|bottom" android:fitsSystemWindows="true" android:orientation="horizontal" > <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="145dip" android:clipChildren="false" android:layout_gravity="center_vertical|center_horizontal|bottom" android:fitsSystemWindows="true" android:orientation="vertical" > <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center_vertical|center" android:fitsSystemWindows="true" android:clipChildren="false" android:orientation="horizontal" android:stretchColumns="true"> <LinearLayout android:baselineAligned="true" android:layout_width="fill_parent" android:layout_gravity="center" android:layout_height="fill_parent" android:fitsSystemWindows="true" android:clipChildren="false" android:orientation="horizontal"> <Button android:id="@+id/KoofButton" android:layout_width="wrap_content" android:layout_height="35dip" android:text="@string/Koof" android:layout_gravity="center" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/raishButton" android:layout_width="wrap_content" android:layout_height="35dip" android:text="@string/Raish" android:layout_gravity="center_horizontal" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/alephButton" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="35dip" android:text="@string/Alef" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/tetButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="35dip" android:text="@string/Tet" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/vuvButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal" android:text="@string/Vuv" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/nunSophitButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal" android:text="@string/NunSofit" android:fitsSystemWindows="true" android:gravity="fill" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/memSofitButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="35dip" android:text="@string/MemSofit" android:fitsSystemWindows="true" android:ellipsize="marquee"/> <Button android:soundEffectsEnabled="true" android:id="@+id/payButton" android:layout_width="wrap_content" android:layout_height="35dip" android:text="@string/Pay" android:fitsSystemWindows="true" android:layout_gravity="center_horizontal" android:ellipsize="marquee"/> </LinearLayout> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:clipChildren="true" android:layout_gravity="center_horizontal|center_vertical|center" android:fitsSystemWindows="true" android:orientation="horizontal"> <RelativeLayout android:layout_width="fill_parent" android:clipChildren="true" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center" android:gravity="bottom" android:orientation="horizontal"> <Button android:layout_alignWithParentIfMissing="true" android:soundEffectsEnabled="true" android:id="@+id/shinButton" android:layout_width="wrap_content" android:layout_centerHorizontal="true" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Shin" android:layout_alignParentLeft="true" android:fitsSystemWindows="true" /> <Button android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:layout_toRightOf="@id/shinButton" android:id="@+id/dalidButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Dalid" android:layout_alignWithParentIfMissing="true" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/gimleButton" android:layout_toRightOf="@id/dalidButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Gimle" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/chufButton" android:layout_toRightOf="@id/gimleButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Chuf" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/ieyinButton" android:layout_toRightOf="@id/chufButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Ieyin" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/yudButton" android:layout_toRightOf="@id/ieyinButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Yud" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/chetButton" android:layout_toRightOf="@id/yudButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Chet" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/lamidButton" android:layout_toRightOf="@id/chetButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Lamid" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/chufSofitButton" android:layout_toRightOf="@id/lamidButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/ChufSofit" android:fitsSystemWindows="true" /> <Button android:layout_alignWithParentIfMissing="true" android:layout_centerHorizontal="true" android:soundEffectsEnabled="true" android:id="@+id/paySofitButton" android:layout_toRightOf="@id/chufSofitButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/PaySofit" android:fitsSystemWindows="true" /> </RelativeLayout> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center_vertical|center" android:fitsSystemWindows="true" android:orientation="horizontal"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center" android:gravity="bottom" android:orientation="horizontal"> <Button android:soundEffectsEnabled="true" android:id="@+id/zionButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Zion" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/samichButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Samich" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/betButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Bet" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/heyButton" android:layout_width="wrap_content" android:layout_gravity="center_horizontal|center_vertical|center" android:layout_height="35dip" android:text="@string/Hey" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/nunButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Nun" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/memButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Mem" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/tzadiButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Tzadi" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/tuffButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/Tuff" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/tzadiSofitButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="@string/TzadiSofit" android:fitsSystemWindows="true" /> </LinearLayout> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center_vertical|center" android:fitsSystemWindows="true" android:orientation="horizontal"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_horizontal|center" android:gravity="bottom" android:orientation="horizontal"> <Button android:soundEffectsEnabled="true" android:id="@+id/hebrewBackButton" android:layout_width="wrap_content" android:layout_height="35dip" android:layout_gravity="right" android:fitsSystemWindows="true" android:text="&lt;--"/> <Button android:soundEffectsEnabled="true" android:id="@+id/hebrewSpaceButton" android:layout_width="150dip" android:layout_height="35dip" android:layout_gravity="center_horizontal|center_vertical|center" android:text="" android:fitsSystemWindows="true" /> <Button android:soundEffectsEnabled="true" android:id="@+id/hebrewDoneButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:text="Done" android:fitsSystemWindows="true" /> </LinearLayout> </TableRow> </TableLayout> </TableLayout> </FrameLayout> Here is a picture of what it looks like right now in portrait: and here is what it looks like in landscape:

    Read the article

  • Multiple screen support in android?

    - by Yugesh
    In my application have six buttons,the screen size is 4.65" 720p(720X1280 : xhdpi),device take this resolution from normal layout folder.when i run it in device.it display like the image am shown below.how to set this six buttons fit to the screen according to layout width and height.I don't know how to do.Can any one know please help me to solve this problem. My XML coding <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/home_xml" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" > <Button android:id="@+id/btn_login" android:layout_width="101dp" android:layout_height="193dp" android:layout_alignParentLeft="true" android:layout_below="@+id/imageView1" android:layout_marginLeft="4dp" android:layout_marginTop="78dp" android:background="@drawable/login_button" /> <Button android:id="@+id/btn_order" android:layout_width="101dp" android:layout_height="wrap_content" android:layout_alignBottom="@+id/btn_login" android:layout_alignTop="@+id/btn_login" android:layout_marginLeft="3dp" android:layout_toRightOf="@+id/btn_login" android:background="@drawable/order_button" /> <Button android:id="@+id/btn_abtus" android:layout_width="101dp" android:layout_height="wrap_content" android:layout_alignBottom="@+id/btn_order" android:layout_alignTop="@+id/btn_order" android:layout_marginLeft="3dp" android:layout_toRightOf="@+id/btn_order" android:background="@drawable/aboutus_button" /> <Button android:id="@+id/btn_outlet" android:layout_width="100dp" android:layout_height="198dp" android:layout_alignLeft="@+id/btn_login" android:layout_alignRight="@+id/btn_login" android:layout_below="@+id/btn_login" android:background="@drawable/outlets_button" /> <Button android:id="@+id/btn_feedback" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/btn_outlet" android:layout_alignLeft="@+id/btn_order" android:layout_alignRight="@+id/btn_order" android:layout_alignTop="@+id/btn_outlet" android:background="@drawable/feedback_button" /> <Button android:id="@+id/btn_games" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/btn_feedback" android:layout_alignLeft="@+id/btn_abtus" android:layout_alignRight="@+id/btn_abtus" android:layout_alignTop="@+id/btn_feedback" android:background="@drawable/games_button" /> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="44dp" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:background="#98110e" > </RelativeLayout>

    Read the article

  • Compat Wireless Drivers Centrino N-2230

    - by user2699451
    So I am using linux and am having trouble installing the Compat Wireless drivers Hardware: Intel Centrino N-2230 OS: Linux Mint 64bit (kernel 13.08-generic) I followed this link http://www.mathyvanhoef.com/2012/09/compat-wireless-injection-patch-for.html Output: apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree Reading state information... Done linux-headers-3.8.0-19-generic is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. charles-W55xEU compat-wireless-2010-10-16 # cd ~ charles-W55xEU ~ # dir adt-bundle-linux-x86_64-20130917.zip Desktop known_hosts_backup charles-W55xEU ~ # wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.2-1-snp.tar.bz2 --2013-10-29 10:28:23-- http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.2-1-snp.tar.bz2 Resolving www.orbit-lab.org (www.orbit-lab.org)... 128.6.192.131 Connecting to www.orbit-lab.org (www.orbit-lab.org)|128.6.192.131|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4443700 (4,2M) [application/x-bzip2] Saving to: ‘compat-wireless-3.6.2-1-snp.tar.bz2’ 100%[======================================>] 4 443 700 13,5KB/s in 11m 3s 2013-10-29 10:39:27 (6,55 KB/s) - ‘compat-wireless-3.6.2-1-snp.tar.bz2’ saved [4443700/4443700] charles-W55xEU ~ # tar -xf compat-wireless-3.6.2-1-snp.tar.bz2 charles-W55xEU ~ # cd compat-wireless-3.6-rc6-1 bash: cd: compat-wireless-3.6-rc6-1: No such file or directory charles-W55xEU ~ # dir adt-bundle-linux-x86_64-20130917.zip Desktop compat-wireless-3.6.2-1-snp known_hosts_backup compat-wireless-3.6.2-1-snp.tar.bz2 charles-W55xEU ~ # cd compat-wireless-3.6.2-1-snp/ charles-W55xEU compat-wireless-3.6.2-1-snp # dir code-metrics.txt defconfigs linux-next-pending pending-stable compat drivers MAINTAINERS README config.mk enable-older-kernels Makefile scripts COPYRIGHT include net udev crap linux-next-cherry-picks patches charles-W55xEU compat-wireless-3.6.2-1-snp # wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch --2013-10-29 10:40:52-- http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch Resolving patches.aircrack-ng.org (patches.aircrack-ng.org)... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2 Connecting to patches.aircrack-ng.org (patches.aircrack-ng.org)|213.186.33.2|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1049 (1,0K) [text/plain] Saving to: ‘mac80211.compat08082009.wl_frag+ack_v1.patch’ 100%[======================================>] 1 049 --.-K/s in 0s 2013-10-29 10:40:56 (180 MB/s) - ‘mac80211.compat08082009.wl_frag+ack_v1.patch’ saved [1049/1049] charles-W55xEU compat-wireless-3.6.2-1-snp # patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch patching file net/mac80211/tx.c Hunk #1 succeeded at 792 (offset 115 lines). charles-W55xEU compat-wireless-3.6.2-1-snp # wget -Ocompatwireless_chan_qos_frag.patch http://pastie.textmate.org/pastes/4882675/download --2013-10-29 10:43:18-- http://pastie.textmate.org/pastes/4882675/download Resolving pastie.textmate.org (pastie.textmate.org)... 178.79.137.125 Connecting to pastie.textmate.org (pastie.textmate.org)|178.79.137.125|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://pastie.org/pastes/4882675/download [following] --2013-10-29 10:43:20-- http://pastie.org/pastes/4882675/download Resolving pastie.org (pastie.org)... 96.126.119.119 Connecting to pastie.org (pastie.org)|96.126.119.119|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2036 (2,0K) [application/octet-stream] Saving to: ‘compatwireless_chan_qos_frag.patch’ 100%[======================================>] 2 036 --.-K/s in 0,001s 2013-10-29 10:43:21 (3,35 MB/s) - ‘compatwireless_chan_qos_frag.patch’ saved [2036/2036] charles-W55xEU compat-wireless-3.6.2-1-snp # patch -p1 < compatwireless_chan_qos_frag.patch patching file drivers/net/wireless/rtl818x/rtl8187/dev.c patching file net/mac80211/tx.c Hunk #1 succeeded at 1495 (offset 8 lines). patching file net/wireless/chan.c charles-W55xEU compat-wireless-3.6.2-1-snp # make ./scripts/gen-compat-autoconf.sh /root/compat-wireless-3.6.2-1-snp/.config /root/compat-wireless-3.6.2-1-snp/config.mk > include/linux/compat_autoconf.h make -C /lib/modules/3.8.0-19-generic/build M=/root/compat-wireless-3.6.2-1-snp modules make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic' CC [M] /root/compat-wireless-3.6.2-1-snp/compat/main.o LD [M] /root/compat-wireless-3.6.2-1-snp/compat/compat.o CC [M] /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.o In file included from /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma.h:8:0, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:8, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8: /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma_driver_pci.h:217:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_core_pci_init’ In file included from /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma.h:10:0, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:8, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8: /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma_driver_gmac_cmn.h:95:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_core_gmac_cmn_init’ In file included from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8:0: /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:25:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’ /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:152:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’ /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:17:21: warning: ‘bcma_bus_next_num’ defined but not used [-Wunused-variable] /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:93:12: warning: ‘bcma_register_cores’ defined but not used [-Wunused-function] make[3]: *** [/root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.o] Error 1 make[2]: *** [/root/compat-wireless-3.6.2-1-snp/drivers/bcma] Error 2 make[1]: *** [_module_/root/compat-wireless-3.6.2-1-snp] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic' make: *** [modules] Error 2 charles-W55xEU compat-wireless-3.6.2-1-snp # make install Warning: You may or may not need to update your initframfs, you should if any of the modules installed are part of your initramfs. To add support for your distribution to do this automatically send a patch against ./scripts/update-initramfs. If your distribution does not require this send a patch against the '/usr/bin/lsb_release -i -s': LinuxMint tag for your distribution to avoid this warning. make -C /lib/modules/3.8.0-19-generic/build M=/root/compat-wireless-3.6.2-1-snp modules make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic' CC [M] /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.o In file included from /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma.h:8:0, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:8, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8: /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma_driver_pci.h:217:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_core_pci_init’ In file included from /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma.h:10:0, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:8, from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8: /root/compat-wireless-3.6.2-1-snp/include/linux/bcma/bcma_driver_gmac_cmn.h:95:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_core_gmac_cmn_init’ In file included from /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:8:0: /root/compat-wireless-3.6.2-1-snp/drivers/bcma/bcma_private.h:25:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’ /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:152:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bcma_bus_register’ /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:17:21: warning: ‘bcma_bus_next_num’ defined but not used [-Wunused-variable] /root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.c:93:12: warning: ‘bcma_register_cores’ defined but not used [-Wunused-function] make[3]: *** [/root/compat-wireless-3.6.2-1-snp/drivers/bcma/main.o] Error 1 make[2]: *** [/root/compat-wireless-3.6.2-1-snp/drivers/bcma] Error 2 make[1]: *** [_module_/root/compat-wireless-3.6.2-1-snp] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic' make: *** [modules] Error 2 charles-W55xEU compat-wireless-3.6.2-1-snp # It keeps giving errors, same with other sites, I get the same errors??? I am lost, help needed

    Read the article

  • error LNK2005: xxx already defined in MSVCRT.lib(MSVCR100.dll) C:\something\LIBCMT.lib(setlocal.obj)

    - by volpack
    Hello, I'm using DCMTK library for reading Dicom files (Image format used in medical image processing.) I'm having a problem in compiling this DCMTK source code. DCMTK uses some additional external libraries (zlib, tiff, libpng, libxml2, libiconv). I know that all libraries should be generated with same Code Generation Options. I've downloaded the compiled versions of these support libraries which are compiled with "Multithreaded DLL" runtime options (/MD). In each project of DCMTK source code I ensured that runtime options are "Multithreaded DLL" (/MD). But still I'm getting these errors: Error 238 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmp2pgm Error 239 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmp2pgm Error 240 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmp2pgm Error 241 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmp2pgm Error 242 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmp2pgm Error 243 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmp2pgm Error 244 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmp2pgm Error 245 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmp2pgm Error 246 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(fflush.obj) dcmp2pgm Error 247 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(dosmap.obj) dcmp2pgm Error 248 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(invarg.obj) dcmp2pgm Error 249 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(hooks.obj) dcmp2pgm Error 250 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmp2pgm Error 251 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmp2pgm Error 252 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmp2pgm Error 253 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmp2pgm Error 254 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmp2pgm Error 255 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmp2pgm Error 256 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(winxfltr.obj) dcmp2pgm Error 257 error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0.obj) dcmp2pgm Error 258 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(errmode.obj) dcmp2pgm Error 259 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(setlocal.obj) dcmp2pgm Error 260 error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(getenv.obj) dcmp2pgm Error 261 error LNK2005: __isctype already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(isctype.obj) dcmp2pgm Error 262 error LNK2005: __strnicmp already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(strnicmp.obj) dcmp2pgm Error 263 error LNK2005: __close already defined in LIBCMT.lib(close.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 264 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 265 error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 266 error LNK2005: _atol already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 267 error LNK2005: _strcspn already defined in LIBCMT.lib(strcspn.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 268 error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 269 error LNK2005: _atoi already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 270 error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 271 error LNK2005: __read already defined in LIBCMT.lib(read.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 272 error LNK2005: __write already defined in LIBCMT.lib(write.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 273 error LNK2005: __open already defined in LIBCMT.lib(open.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 274 error LNK2005: __get_osfhandle already defined in LIBCMT.lib(osfinfo.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmp2pgm Error 278 error LNK1169: one or more multiply defined symbols found C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\Release\dcmp2pgm.exe 1 1 dcmp2pgm Error 201 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscp Error 202 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscp Error 203 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscp Error 204 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscp Error 205 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscp Error 206 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscp Error 207 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscp Error 208 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscp Error 209 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(fflush.obj) dcmprscp Error 210 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(dosmap.obj) dcmprscp Error 211 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(invarg.obj) dcmprscp Error 212 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(hooks.obj) dcmprscp Error 213 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscp Error 214 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscp Error 215 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscp Error 216 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscp Error 217 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmprscp Error 218 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmprscp Error 219 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(winxfltr.obj) dcmprscp Error 220 error LNK2005: __stricmp already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(stricmp.obj) dcmprscp Error 221 error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0.obj) dcmprscp Error 222 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(errmode.obj) dcmprscp Error 223 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(setlocal.obj) dcmprscp Error 224 error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(getenv.obj) dcmprscp Error 225 error LNK2005: __isctype already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(isctype.obj) dcmprscp Error 226 error LNK2005: __strnicmp already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(strnicmp.obj) dcmprscp Error 227 error LNK2005: __close already defined in LIBCMT.lib(close.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 228 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 229 error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 230 error LNK2005: __read already defined in LIBCMT.lib(read.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 231 error LNK2005: __write already defined in LIBCMT.lib(write.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 232 error LNK2005: __open already defined in LIBCMT.lib(open.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 233 error LNK2005: __get_osfhandle already defined in LIBCMT.lib(osfinfo.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscp Error 237 error LNK1169: one or more multiply defined symbols found C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\Release\dcmprscp.exe 1 1 dcmprscp Error 160 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscu Error 161 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscu Error 162 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmprscu Error 163 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscu Error 164 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscu Error 165 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscu Error 166 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscu Error 167 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmprscu Error 168 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(fflush.obj) dcmprscu Error 169 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(dosmap.obj) dcmprscu Error 170 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(invarg.obj) dcmprscu Error 171 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(hooks.obj) dcmprscu Error 172 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscu Error 173 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscu Error 174 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscu Error 175 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmprscu Error 176 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmprscu Error 177 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmprscu Error 178 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(winxfltr.obj) dcmprscu Error 179 error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0.obj) dcmprscu Error 180 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(errmode.obj) dcmprscu Error 181 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(setlocal.obj) dcmprscu Error 182 error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(getenv.obj) dcmprscu Error 183 error LNK2005: __isctype already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(isctype.obj) dcmprscu Error 184 error LNK2005: __strnicmp already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(strnicmp.obj) dcmprscu Error 185 error LNK2005: __close already defined in LIBCMT.lib(close.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 186 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 187 error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 188 error LNK2005: _atol already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 189 error LNK2005: _strcspn already defined in LIBCMT.lib(strcspn.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 190 error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 191 error LNK2005: _atoi already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 192 error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 193 error LNK2005: __read already defined in LIBCMT.lib(read.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 194 error LNK2005: __write already defined in LIBCMT.lib(write.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 195 error LNK2005: __open already defined in LIBCMT.lib(open.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 196 error LNK2005: __get_osfhandle already defined in LIBCMT.lib(osfinfo.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmprscu Error 200 error LNK1169: one or more multiply defined symbols found C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\Release\dcmprscu.exe dcmprscu Error 119 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmpsprt Error 120 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmpsprt Error 121 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(_file.obj) dcmpsprt Error 122 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmpsprt Error 123 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmpsprt Error 124 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmpsprt Error 125 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmpsprt Error 126 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0dat.obj) dcmpsprt Error 127 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(fflush.obj) dcmpsprt Error 128 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(dosmap.obj) dcmpsprt Error 129 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(invarg.obj) dcmpsprt Error 130 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(hooks.obj) dcmpsprt Error 131 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmpsprt Error 132 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmpsprt Error 133 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmpsprt Error 134 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0init.obj) dcmpsprt Error 135 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmpsprt Error 136 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(mlock.obj) dcmpsprt Error 137 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(winxfltr.obj) dcmpsprt Error 138 error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(crt0.obj) dcmpsprt Error 139 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(errmode.obj) dcmpsprt Error 140 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(setlocal.obj) dcmpsprt Error 141 error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(getenv.obj) dcmpsprt Error 142 error LNK2005: __isctype already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(isctype.obj) dcmpsprt Error 143 error LNK2005: __strnicmp already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\LIBCMT.lib(strnicmp.obj) dcmpsprt Error 144 error LNK2005: __close already defined in LIBCMT.lib(close.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 145 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 146 error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 147 error LNK2005: _atol already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 148 error LNK2005: _strcspn already defined in LIBCMT.lib(strcspn.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 149 error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 150 error LNK2005: _atoi already defined in LIBCMT.lib(atox.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 151 error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 152 error LNK2005: __read already defined in LIBCMT.lib(read.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 153 error LNK2005: __write already defined in LIBCMT.lib(write.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 154 error LNK2005: __open already defined in LIBCMT.lib(open.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 155 error LNK2005: __get_osfhandle already defined in LIBCMT.lib(osfinfo.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\MSVCRT.lib(MSVCR100.dll) dcmpsprt Error 159 error LNK1169: one or more multiply defined symbols found C:\dcmtk-3.5.4-src\CMakeBinaries\dcmpstat\apps\Release\dcmpsprt.exe 1 1 dcmpsprt Error 61 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2html Error 62 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2html Error 63 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2html Error 64 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2html Error 65 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2html Error 66 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2html Error 67 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2html Error 68 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2html Error 69 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(fflush.obj) dsr2html Error 70 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(dosmap.obj) dsr2html Error 71 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(invarg.obj) dsr2html Error 72 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(hooks.obj) dsr2html Error 73 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0init.obj) dsr2html Error 74 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0init.obj) dsr2html Error 75 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0init.obj) dsr2html Error 76 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0init.obj) dsr2html Error 77 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(mlock.obj) dsr2html Error 78 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(mlock.obj) dsr2html Error 79 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(winxfltr.obj) dsr2html Error 80 error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0.obj) dsr2html Error 81 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(errmode.obj) dsr2html Error 82 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(setlocal.obj) dsr2html Error 83 error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(getenv.obj) dsr2html Error 84 error LNK2005: __isctype already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(isctype.obj) dsr2html Error 85 error LNK2005: __close already defined in LIBCMT.lib(close.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\MSVCRT.lib(MSVCR100.dll) dsr2html Error 86 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\MSVCRT.lib(MSVCR100.dll) dsr2html Error 90 error LNK1169: one or more multiply defined symbols found C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\Release\dsr2html.exe 1 1 dsr2html Error 31 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2xml Error 32 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2xml Error 33 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(_file.obj) dsr2xml Error 34 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCMT.lib(crt0dat.obj) dsr2xml Error 35 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) C:\dcmtk-3.5.4-src\CMakeBinaries\dcmsr\apps\LIBCM

    Read the article

  • How can I create a weekly calendar view for an Android Honeycomb application?

    - by BVB
    I am working on an Android (v3.0) application that has a requirement of mimicking the weekly calendar layout found on Google Calendar: The events will be based on external requests through the Google Calendar API (I already have this part working). Using the API, I can obtain a list of events for the week, with each event having a starting and and ending datetime. I would like to use this data to show the scheduled events to the application's users in a view similar to the one above. Here's what I have so far: The XML appears below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="800dp" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Calendar Title" android:textAppearance="?android:attr/textAppearanceLarge" /> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" > <TextView android:id="@+id/textView2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="" /> <TextView android:id="@+id/textView3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Sunday" /> <TextView android:id="@+id/textView4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Monday" /> <TextView android:id="@+id/textView5" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Tuesday" /> <TextView android:id="@+id/textView6" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Wednesday" /> <TextView android:id="@+id/textView7" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Thursday" /> <TextView android:id="@+id/textView8" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Friday" /> <TextView android:id="@+id/textView9" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:gravity="center" android:text="Saturday" /> </LinearLayout> </RelativeLayout> <ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="0dp" android:scrollbars="none" >" <RelativeLayout android:id="@+id/relativeLayout242" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="0dp" > <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="0dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="40dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="80dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="120dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="160dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="200dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="240dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="280dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="320dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="360dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="400dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="440dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="480dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="520dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="560dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="600dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="640dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="680dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="720dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="760dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="800dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="840dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="880dp"/> <View android:background="#aaa" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="920dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="20dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="60dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="100dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="140dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="180dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="220dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="260dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="300dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="340dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="380dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="420dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="460dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="500dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="540dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="580dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="620dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="660dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="700dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="740dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="780dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="820dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="860dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="900dp"/> <View android:background="#777" android:layout_width = "fill_parent" android:layout_height="1dp" android:layout_marginTop="940dp"/> <LinearLayout android:id="@+id/linearLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="0dp" > <RelativeLayout android:id="@+id/relativeLayout2" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:padding="0dp" > <View android:background="#aaa" android:layout_width = "1dp" android:layout_height="fill_parent" android:layout_alignParentRight="true"/> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dp" android:gravity="center" android:text="12am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="40dp" android:gravity="center" android:text="1am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="80dp" android:gravity="center" android:text="2am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="120dp" android:gravity="center" android:text="3am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="160dp" android:gravity="center" android:text="4am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="200dp" android:gravity="center" android:text="5am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="240dp" android:gravity="center" android:text="6am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="280dp" android:gravity="center" android:text="7am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="320dp" android:gravity="center" android:text="8am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="360dp" android:gravity="center" android:text="9am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="400dp" android:gravity="center" android:text="10am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="440dp" android:gravity="center" android:text="11am" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="480dp" android:gravity="center" android:text="12pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="520dp" android:gravity="center" android:text="1pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="560dp" android:gravity="center" android:text="2pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="600dp" android:gravity="center" android:text="3pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="640dp" android:gravity="center" android:text="4pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="680dp" android:gravity="center" android:text="5pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="720dp" android:gravity="center" android:text="6pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="760dp" android:gravity="center" android:text="7pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="800dp" android:gravity="center" android:text="8pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="840dp" android:gravity="center" android:text="9pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="880dp" android:gravity="center" android:text="10pm" /> <TextView android:id="@+id/textView10" android:layout_width="match_parent" android:layout_height="40dp" android:layout_marginTop="920dp" android:gravity="center|top" android:text="11pm" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout3" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="14" android:padding="0dp" > <LinearLayout android:id="@+id/linearLayout3" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:padding="0dp" > <RelativeLayout android:id="@+id/relativeLayout4" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="180dp" android:layout_marginTop="180dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="180dp" android:layout_marginTop="180dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout5" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="180dp" android:layout_marginTop="280dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="180dp" android:layout_marginTop="280dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout6" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="60dp" android:layout_marginTop="40dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="60dp" android:layout_marginTop="40dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout7" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="90dp" android:layout_marginTop="60dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="90dp" android:layout_marginTop="60dp" android:text="Some Event" /> <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="120dp" android:layout_marginTop="340dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="120dp" android:layout_marginTop="340dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout8" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="180dp" android:layout_marginTop="380dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="180dp" android:layout_marginTop="380dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout9" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="180dp" android:layout_marginTop="480dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="180dp" android:layout_marginTop="480dp" android:text="Some Event" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout10" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" > <View android:background="#00f" android:layout_width = "fill_parent" android:layout_height="180dp" android:layout_marginTop="340dp"/> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="180dp" android:layout_marginTop="340dp" android:text="Some Event" /> </RelativeLayout> </LinearLayout> </RelativeLayout> </LinearLayout> </RelativeLayout> </ScrollView> </LinearLayout> My approach was to make 40dp equal to 1 hr of time. Thus, whenever I would like to add an event that has a duration of 1.5 hours, I will make an 60dp button that I will place at the exact location that the time begins (12am = 0dp from the top, 1pm = 40dp from the top, 2pm = 80d from the top, etc). My questions are: Is there a better way of doing this? How can I convert my XML to be stand-alone view that could be added to any Android project? (I plan on perhaps making a blog post about the end product) Thank you!

    Read the article

  • Why does my layout repeats in device but looks fine on emulator when an image is added in a Relative Layout?

    - by Honey H
    let me try to explain clearly with what I want here. I have a RelativeLayout that contains a header image and the content below it. Now, when i have a header image and a list view below it, the page fits the screen in the device properly, the layout does not repeat. But when I place an image below the header image, the layout repeats in the device. Meaning i could see 2 header images in the device. Some page, I could see half of the header image that is not supposed to be there (repeated header image). However, in emulator, all the pages looks fine and fit the screen nicely. I tried changing to LinearLayout, RelativeLayout inside LinearLayout, Relative Layout, it gave me the same outcome. I hope someone could tell me why this happened. Thanks. Attached is my layout. <?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" android:orientation="vertical" android:background="@drawable/bg" > <ImageView android:id="@+id/header" android:contentDescription="@string/image" android:src= "@drawable/header" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:scaleType="centerCrop"/> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:orientation="vertical" > <ImageView android:id="@+id/journal" android:layout_width="150dp" android:layout_height="150dp" android:layout_alignTop="@+id/kick" android:adjustViewBounds="true" android:contentDescription="@string/image" android:padding="10dp" android:src="@drawable/favourite_journal" /> <ImageView android:id="@+id/kick" android:layout_width="150dp" android:layout_height="150dp" android:layout_toRightOf="@+id/journal" android:layout_below="@+id/header" android:adjustViewBounds="true" android:contentDescription="@string/image" android:padding="10dp" android:src="@drawable/favourite_kick" /> <ImageView android:id="@+id/labour" android:layout_width="150dp" android:layout_height="150dp" android:layout_below="@+id/journal" android:layout_alignLeft="@+id/journal" android:adjustViewBounds="true" android:contentDescription="@string/image" android:padding="10dp" android:src="@drawable/favourite_labour" /> <ImageView android:id="@+id/share" android:layout_width="150dp" android:layout_height="150dp" android:layout_below="@+id/kick" android:layout_alignLeft="@+id/kick" android:adjustViewBounds="true" android:contentDescription="@string/image" android:padding="10dp" android:src="@drawable/favourite_share" /> </RelativeLayout> </RelativeLayout>

    Read the article

  • Need help with Android TableLayout alignment

    - by Ben L.
    I'm trying to build a calculator layout using TableLayout, but the last two rows aren't aligning with the rest of the layout. Is there something wrong with my layout XML? What I'm trying to do would be easier to accomplish in HTML (<td> with colspan or rowspan), so should I try converting this into a WebView? Code is as follows: (Screenshot) <?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="fill_parent"> <EditText android:id="@+id/EditText01" android:layout_height="wrap_content" android:layout_width="fill_parent" /> <TableLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:stretchColumns="*"> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <Button android:id="@+id/Button08" android:textSize="16pt" android:text="^" android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="wrap_content" /> <Button android:id="@+id/Button09" android:text="÷" android:textSize="16pt" android:layout_height="fill_parent" android:layout_weight="1" android:layout_width="wrap_content" /> <Button android:id="@+id/Button10" android:text="×" android:textSize="16pt" android:layout_height="fill_parent" android:layout_weight="1" android:layout_width="wrap_content" /> <Button android:id="@+id/Button11" android:textSize="16pt" android:text="-" android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="wrap_content" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2"> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1"> <Button android:id="@+id/Button01" android:text="7" android:textSize="16pt" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="fill_parent" /> <Button android:layout_height="wrap_content" android:textSize="16pt" android:text="4" android:id="@+id/Button05" android:layout_weight="1" android:layout_width="fill_parent" /> </LinearLayout> <LinearLayout android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1" android:layout_width="fill_parent"> <Button android:id="@+id/Button02" android:layout_height="wrap_content" android:text="8" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" /> <Button android:layout_height="wrap_content" android:textSize="16pt" android:text="5" android:id="@+id/Button06" android:layout_weight="1" android:layout_width="fill_parent" /> </LinearLayout> <LinearLayout android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1" android:layout_width="fill_parent"> <Button android:id="@+id/Button03" android:text="9" android:textSize="16pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> <Button android:textSize="16pt" android:text="6" android:id="@+id/Button07" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> </LinearLayout> <Button android:id="@+id/Button04" android:text="+" android:textSize="16pt" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2"> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="2"> <LinearLayout android:layout_weight="1" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/Button02" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="1" /> <Button android:textSize="16pt" android:id="@+id/Button06" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="2" /> </LinearLayout> <Button android:id="@+id/Button01" android:layout_height="wrap_content" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" android:text="0" /> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1"> <Button android:id="@+id/Button03" android:textSize="16pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="3" /> <Button android:textSize="16pt" android:id="@+id/Button07" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="." /> </LinearLayout> <Button android:id="@+id/Button04" android:textSize="16pt" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1" android:text="=" /> </TableRow> </TableLayout> </LinearLayout>

    Read the article

  • App cannot start at all in Android 2.2 (Froyo)

    - by Roland Lim
    Dear fellow Android developers & Google Engineers, My app has been running okay until the recent Froyo update. After installing the Android 2.2 SDK, I can compile my code without any errors. However, when I run it, it just force closes: Here's the log: 05-23 10:15:13.463: DEBUG/AndroidRuntime(423): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 05-23 10:15:13.463: DEBUG/AndroidRuntime(423): CheckJNI is ON 05-23 10:15:14.193: DEBUG/AndroidRuntime(423): --- registering native functions --- 05-23 10:15:15.293: DEBUG/AndroidRuntime(423): Shutting down VM 05-23 10:15:15.303: DEBUG/dalvikvm(423): Debugger has detached; object registry had 1 entries 05-23 10:15:15.333: INFO/AndroidRuntime(423): NOTE: attach of thread 'Binder Thread #3' failed 05-23 10:15:16.003: DEBUG/AndroidRuntime(431): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 05-23 10:15:16.013: DEBUG/AndroidRuntime(431): CheckJNI is ON 05-23 10:15:16.273: DEBUG/AndroidRuntime(431): --- registering native functions --- 05-23 10:15:17.392: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat= [android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.handyapps.easymoney/.EasyMoney } 05-23 10:15:17.602: DEBUG/AndroidRuntime(431): Shutting down VM 05-23 10:15:17.662: DEBUG/dalvikvm(431): Debugger has detached; object registry had 1 entries 05-23 10:15:17.742: INFO/AndroidRuntime(431): NOTE: attach of thread 'Binder Thread #3' failed 05-23 10:15:17.912: INFO/ActivityManager(59): Start proc com.handyapps.easymoney for activity com.handyapps.easymoney/.EasyMoney: pid=438 uid=10035 gids={1006, 1015} 05-23 10:15:19.032: DEBUG/AndroidRuntime(438): Shutting down VM 05-23 10:15:19.032: WARN/dalvikvm(438): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): FATAL EXCEPTION: main 05-23 10:15:19.062: ERROR/AndroidRuntime(438): java.lang.RuntimeException: Unable to instantiate application com.handyapps.easymoney.EasyMoney: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$PackageInfo.makeApplication (ActivityThread.java:649) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4232) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.access$3000(ActivityThread.java:125) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.os.Handler.dispatchMessage(Handler.java:99) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.os.Looper.loop(Looper.java:123) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.main(ActivityThread.java:4627) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at java.lang.reflect.Method.invokeNative(Native Method) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at java.lang.reflect.Method.invoke(Method.java:521) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:868) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at dalvik.system.NativeStart.main(Native Method) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): Caused by: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.Instrumentation.newApplication(Instrumentation.java:957) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.Instrumentation.newApplication(Instrumentation.java:942) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$PackageInfo.makeApplication (ActivityThread.java:644) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): ... 11 more 05-23 10:15:19.082: WARN/ActivityManager(59): Force finishing activity com.handyapps.easymoney/.EasyMoney 05-23 10:15:19.592: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{450018f0 com.handyapps.easymoney/.EasyMoney} //////////////THE ANDROID MANIFEST FILE//// <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-feature android:name="android.hardware.camera" /> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> <application android:icon="@drawable/icon" android:name="@string/app_name" android:label="@string/app_name" android:debuggable="false"> <activity android:name=".EasyMoney" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar" android:launchMode="singleTask" android:clearTaskOnLaunch="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".TranList" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".TranEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BillReminderEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BillReminderList" android:launchMode="singleTop" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BudgetList" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BudgetEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".Search" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".PasscodeEntry" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden" android:screenOrientation="portrait"/> <activity android:name=".AccountList" android:theme="@android:style/Theme.Light.NoTitleBar"> </activity> <activity android:name=".AccountEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".UserSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".CurrencySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".DisplaySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BackupSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".CategoryList" android:theme="@android:style/Theme.Light.NoTitleBar" /> <activity android:name=".CategoryEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".ExpenseByCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BalanceReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyExpenseReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyIncomeReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyCashflowReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".PhotoList" android:theme="@android:style/Theme.Light.NoTitleBar" /> <activity android:name=".ExpenseByPayee" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".ExpenseBySubCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/> <service android:name="StartAlarm_Service"> <intent-filter> <action android:name="com.handyapps.easymoney.StartAlarm_Service" /> </intent-filter> </service> <service android:name=".AlarmService_Service" android:process=":remote" /> <receiver android:name="StartupIntentReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="android.intent.category.HOME" /> </intent-filter> </receiver> <receiver android:name=".WidgetProvider" android:label="@string/widget_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget" /> </receiver> <receiver android:name=".WidgetProvider" android:label="@string/widget_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <data android:scheme="easymoney_widget" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget" /> </receiver> <receiver android:name=".WidgetProvider"> <intent-filter> <action android:name="com.handyapps.easymoney.WIDGET_CONTROL" /> <data android:scheme="easymoney_widget" /> </intent-filter> </receiver> </application> The main startup class is com.handyapps.easymoney.EasyMoney. I placed a breakpoint at the start of the onCreate() method but I discovered it didn't even reach there. Somehow, the application just couldn't be loaded in Android 2.2... but it works perfectly fine for all the previous Android versions. Been trying to find the cause for the past 2 days but am totally stumped!! Any help will be greatly appreciated!!!! Thanks!! Roland

    Read the article

  • Android text layout question: two textviews, side-by-side, with different layout alignments and weights

    - by thx1200
    I'm still a bit of an Android noob, forgive me if this is simple and I'm just not seeing it. There are two portions of text in a view that spans the entire width horizontally, but is only as high as one line of text. The left side must always be displayed in full, but should take no more horizontal space than it needs. The right side should be pushed over by the left side and fill up the remainder of the screen width. If the right side text is smaller than this width, the text should be right-aligned horizontally. If the text is greater than the width, it should scroll horizontally. The text on the right side will be updated frequently and should slide up with new text when the app tells it (explaining the TextSwitcher in the layout). I have tried two different layout styles. In both situations, I can get the left side to "push" the layout, the right side to scroll, but I can't figure out how to get the right side to right align. It is always left aligned. Here is a picture showing what is happening... http://img10.imageshack.us/img10/5599/androidlayout.png In addition (but less important), in my layout code I have android:fadingEdge="none" on the TextViews, but it still has a faded edge on the left and right side when it scrolls. Why is that? Here are the two layouts I created, which yield the results shown, but not the results I want. Using a horizontal LinearLayout... <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayoutStatusBar" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="2px" android:background="#555555" > <TextView android:id="@+id/TextViewTimer" android:textSize="18px" android:textColor="#FFFFFF" android:layout_gravity="left" android:layout_weight="0" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0px" android:layout_marginRight="3px" android:text="Left Side" > </TextView> <TextSwitcher android:id="@+id/TextSwitcherDetails" android:inAnimation="@anim/push_up_in" android:outAnimation="@anim/push_up_out" android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginLeft="3px" android:layout_marginRight="0px" > <TextView android:id="@+id/TextViewDetails1" android:textSize="18px" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="right" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" android:fadingEdge="none" android:text="Right Side 1" > </TextView> <TextView android:id="@+id/TextViewDetails2" android:textSize="18px" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="right" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" android:fadingEdge="none" android:text="Right Side 2 - This is a really long text this is long and fun and fun and long" > </TextView> </TextSwitcher> </LinearLayout> And the RelativeLayout style... <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayoutStatusBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="2px" android:background="#555555" > <TextView android:id="@+id/TextViewTimer" android:textSize="18px" android:textColor="#FFFFFF" android:layout_gravity="left" android:layout_weight="0" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0px" android:layout_marginRight="3px" android:layout_alignParentLeft="true" android:text="Left Side" > </TextView> <TextSwitcher android:id="@+id/TextSwitcherDetails" android:inAnimation="@anim/push_up_in" android:outAnimation="@anim/push_up_out" android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="3px" android:layout_marginRight="0px" android:layout_toRightOf="@+id/TextViewTimer" android:layout_alignParentRight="true" android:fadingEdge="none" android:fadingEdgeLength="0px" > <TextView android:id="@+id/TextViewDetails1" android:textSize="18px" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="right" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" android:fadingEdge="none" android:fadingEdgeLength="0px" android:text="Right Side 1" > </TextView> <TextView android:id="@+id/TextViewDetails2" android:textSize="18px" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="right" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:focusable="true" android:focusableInTouchMode="true" android:fadingEdge="none" android:fadingEdgeLength="0px" android:text="Right Side 2 - This is a really long text this is long and fun and fun and long" > </TextView> </TextSwitcher> </RelativeLayout> So how do I get that text on the right side to right-align. Thanks!

    Read the article

  • half or quarter black screen in android

    - by Mike McKeown
    I have an android activity that when I launch sometimes (about 1 in 4 times) it only draws quarter or half the screen before showing it. When I change the orientation or press a button the screen draws properly. I'm just using TextViews, Buttons, Fonts - no drawing or anything like that. All of my code for initialising is in the onCreate(). In this method I'm loading a text file, of about 40 lines long, and also getting a shared preference. Could this cause a delay so that it can't draw the intent? Thanks in advance if anyone has seen anything similar. EDIT - I tried commenting out the loading of the word list, but it didn't fix the problem. Here is the activity <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainRelativeLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/blue_abstract_background" > <RelativeLayout android:id="@+id/relativeScore" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <TextView android:id="@+id/ScoreLabel" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:padding="10dip" android:text="SCORE:" android:textSize="18dp" /> /> <TextView android:id="@+id/ScoreText" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toRightOf="@id/ScoreLabel" android:padding="5dip" android:text="0" android:textSize="18dp" /> <TextView android:id="@+id/GameTimerText" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:minWidth="25dp" android:text="0" android:textSize="18dp" /> <TextView android:id="@+id/GameTimerLabel" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toLeftOf="@id/GameTimerText" android:padding="10dip" android:text="TIMER:" android:textSize="18dp" /> /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeHighScore" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/relativeScore" > <TextView android:id="@+id/HighScoreLabel" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:padding="10dip" android:text="HIGH SCORE:" android:textSize="16dp" /> <TextView android:id="@+id/HighScoreText" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/HighScoreLabel" android:padding="10dip" android:text="0" android:textSize="16dp" /> </RelativeLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:layout_below="@+id/relativeHighScore" android:orientation="vertical" > <LinearLayout android:id="@+id/linearMissing" android:layout_width="fill_parent" android:layout_height="80dp" android:layout_gravity="center" android:orientation="vertical" > <View android:layout_width="match_parent" android:layout_height="2dp" android:background="@color/yellow_text" /> <TextView android:id="@+id/MissingWordText" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="center_horizontal" android:layout_marginTop="25dp" android:text="MSSNG WRD" android:textSize="22dp" android:typeface="normal" /> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="2dp" android:background="@color/yellow_text" /> <TableLayout android:id="@+id/buttonsTableLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow3" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:paddingTop="5dp" > <Button android:id="@+id/aVowelButton" android:layout_width="66dp" android:layout_height="66dp" android:layout_gravity="center_horizontal" android:layout_marginBottom="10dp" android:layout_marginRight="5dp" android:background="@drawable/blue_vowel_button" android:text="@string/a" android:textColor="@color/yellow_text" android:textSize="30dp" /> <Button android:id="@+id/eVowelButton" android:layout_width="66dp" android:layout_height="66dp" android:layout_gravity="center_horizontal" android:layout_marginBottom="10dp" android:layout_marginRight="5dp" android:background="@drawable/blue_vowel_button" android:text="@string/e" android:textColor="@color/yellow_text" android:textSize="30dp" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" > <Button android:id="@+id/iVowelButton" android:layout_width="66dp" android:layout_height="66dp" android:layout_gravity="center_horizontal" android:layout_margin="5dp" android:background="@drawable/blue_vowel_buttoni" android:text="@string/i" android:textColor="@color/yellow_text" android:textSize="30dp" /> <Button android:id="@+id/oVowelButton" android:layout_width="66dp" android:layout_height="66dp" android:layout_gravity="center_horizontal" android:layout_margin="5dp" android:background="@drawable/blue_vowel_button" android:text="@string/o" android:textColor="@color/yellow_text" android:textSize="30dp" /> <Button android:id="@+id/uVowelButton" android:layout_width="66dp" android:layout_height="66dp" android:layout_gravity="center_horizontal" android:layout_margin="5dp" android:background="@drawable/blue_vowel_button" android:text="@string/u" android:textColor="@color/yellow_text" android:textSize="30dp" /> </TableRow> </TableLayout> <TextView android:id="@+id/TimeToStartText" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textSize="24dp" /> <Button android:id="@+id/startButton" style="@style/yellowShadowText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="10dp" android:background="@drawable/blue_button_menu" android:gravity="center" android:padding="10dip" android:text="START!" android:textSize="28dp" /> </LinearLayout> </RelativeLayout> And the OnCreate() and a few methods: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game); isNewWord = true; m_gameScore = 0; m_category = getCategoryFromExtras(); // loadWordList(m_category); initialiseTextViewField(); loadHighScoreAndDifficulty(); setFonts(); setButtons(); setStartButton(); enableDisableButtons(false); } private void loadHighScoreAndDifficulty() { //setting preferences SharedPreferences prefs = this.getSharedPreferences(m_category, Context.MODE_PRIVATE); int score = prefs.getInt(m_category, 0); //0 is the default value m_highScore = score; m_highScoreText.setText(String.valueOf(m_highScore)); prefs = this.getSharedPreferences(DIFFICULTY, Context.MODE_PRIVATE); m_difficulty = prefs.getString(DIFFICULTY, NRML_DIFFICULTY); } private void initialiseTextViewField() { m_startButton = (Button) findViewById(R.id.startButton); m_missingWordText = (TextView) findViewById(R.id.MissingWordText); m_gameScoreText = (TextView) findViewById(R.id.ScoreText); m_gameScoreLabel = (TextView) findViewById(R.id.ScoreLabel); m_gameTimerText = (TextView) findViewById(R.id.GameTimerText); m_gameTimerLabel = (TextView) findViewById(R.id.GameTimerLabel); m_timeToStartText = (TextView) findViewById(R.id.TimeToStartText); m_highScoreLabel = (TextView) findViewById(R.id.HighScoreLabel); m_highScoreText = (TextView) findViewById(R.id.HighScoreText); } private String getCategoryFromExtras() { String category = ""; Bundle extras = getIntent().getExtras(); if (extras != null) { category = extras.getString("category"); } return category; } private void enableDisableButtons(boolean enable) { Button button = (Button) findViewById(R.id.aVowelButton); button.setEnabled(enable); button = (Button) findViewById(R.id.eVowelButton); button.setEnabled(enable); button = (Button) findViewById(R.id.iVowelButton); button.setEnabled(enable); button = (Button) findViewById(R.id.oVowelButton); button.setEnabled(enable); button = (Button) findViewById(R.id.uVowelButton); button.setEnabled(enable); } private void setStartButton() { m_startButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { m_gameScore = 0; updateScore(); m_startButton.setVisibility(View.GONE); m_timeToStartText.setVisibility(View.VISIBLE); startPreTimer(); } }); }

    Read the article

  • Android Actionbar Tabs + Fragments + Service

    - by Vladimir
    So, I have 3 problems with my code: 1) I want that each tab saves its state. So that a TextView shows changed text if it was changed. 2) if I go to Tab2 then to Tab1 I can't see the content of the fragments. Only if I touch on the already selected tab, it shows me the content 3) I can't correctly connect/bind and unbind service to Fragment Text must be changed from Service. Please help, I don't know how I realize my intent. MyActivity.java package com.example.tabs; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityManager.RunningServiceInfo; import android.app.Fragment; import android.app.FragmentTransaction; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; public class MyActivity extends Activity { private static String ACTION_BAR_INDEX = "ACTION_BAR_INDEX"; private Tab tTab1; private Tab tTab2; private static MyService.MyBinder myBinder; private static Intent myServiceIntent; private static MyService myService; private TabListener<Tab1> tab1Listener; private TabListener<Tab2> tab2Listener; private static ServiceConnection myConnection = new ServiceConnection() { public void onServiceConnected(ComponentName name, IBinder binder) { myBinder = (MyService.MyBinder) binder; myService = myBinder.getService(); myBinder.setCallbackHandler(myServiceHandler); } public void onServiceDisconnected(ComponentName name) { myService = null; myBinder = null; } }; /** Callbackhandler. */ private static Handler myServiceHandler = new Handler() { public void handleMessage(Message message) { super.handleMessage(message); Bundle bundle = message.getData(); if (bundle != null) { String text = bundle.getString("Text1", ""); if (!text.equals("")) { } } } }; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myServiceIntent = new Intent(this, MyService.class); bindService(myServiceIntent, myConnection, Context.BIND_AUTO_CREATE); if (!isServiceRunning()) { startService(myServiceIntent); } final ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabled(false); tTab1 = actionBar.newTab(); tab1Listener = new TabListener<Tab1>(this, R.id.fl_main, Tab1.class); tTab1.setTag("Tab_1"); tTab1.setText("Tab_1"); tTab1.setTabListener(tab1Listener); tTab2 = actionBar.newTab(); tab2Listener = new TabListener<Tab2>(this, R.id.fl_main, Tab2.class); tTab2.setTag("Tab_2"); tTab2.setText("Tab_2"); tTab2.setTabListener(tab2Listener); actionBar.addTab(tTab1, 0); actionBar.addTab(tTab2, 1); } @Override public void onResume() { super.onResume(); SharedPreferences sp = getPreferences(Activity.MODE_PRIVATE); int actionBarIndex = sp.getInt(ACTION_BAR_INDEX, 0); getActionBar().setSelectedNavigationItem(actionBarIndex); } protected void onSaveInstanceState(Bundle outState) { // Save the current Action Bar tab selection int actionBarIndex = getActionBar().getSelectedTab().getPosition(); SharedPreferences.Editor editor = getPreferences(Activity.MODE_PRIVATE).edit(); editor.putInt(ACTION_BAR_INDEX, actionBarIndex); editor.apply(); // Detach each of the Fragments FragmentTransaction ft = getFragmentManager().beginTransaction(); if (tab2Listener.fragment != null) { ft.detach(tab2Listener.fragment); } if (tab1Listener.fragment != null) { ft.detach(tab1Listener.fragment); } ft.commit(); super.onSaveInstanceState(outState); } protected void onRestoreInstanceState(Bundle savedInstanceState) { // Find the recreated Fragments and assign them to their associated Tab // Listeners. tab1Listener.fragment = getFragmentManager().findFragmentByTag(Tab1.class.getName()); tab2Listener.fragment = getFragmentManager().findFragmentByTag(Tab2.class.getName()); // Restore the previous Action Bar tab selection. SharedPreferences sp = getPreferences(Activity.MODE_PRIVATE); int actionBarIndex = sp.getInt(ACTION_BAR_INDEX, 0); getActionBar().setSelectedNavigationItem(actionBarIndex); super.onRestoreInstanceState(savedInstanceState); } public boolean isServiceRunning() { ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { if (MyService.class.getName().equals(service.service.getClassName())) { return true; } } return false; } @Override protected void onDestroy() { super.onDestroy(); unbindService(myConnection); stopService(myServiceIntent); } public static class TabListener<T extends Fragment> implements ActionBar.TabListener { private Fragment fragment; private Activity activity; private Class<T> fragmentClass; private int fragmentContainer; public TabListener(Activity activity, int fragmentContainer, Class<T> fragmentClass) { this.activity = activity; this.fragmentContainer = fragmentContainer; this.fragmentClass = fragmentClass; } public void onTabReselected(Tab tab, FragmentTransaction ft) { if (fragment != null) { ft.attach(fragment); } } public void onTabSelected(Tab tab, FragmentTransaction ft) { if (fragment == null) { String fragmentName = fragmentClass.getName(); fragment = Fragment.instantiate(activity, fragmentName); ft.add(fragmentContainer, fragment, fragmentName); } else { ft.detach(fragment); } } public void onTabUnselected(Tab tab, FragmentTransaction ft) { if (fragment != null) { ft.detach(fragment); } } } } MyService.java package com.example.tabs; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; public class MyService extends Service { private final IBinder myBinder = new MyBinder(); private static Handler myServiceHandler; public IBinder onBind(Intent intent) { return myBinder; } public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); return START_STICKY; } public void sendMessage(String sText, int id) { Bundle bundle = new Bundle(); bundle.putString("Text" + id, sText); Message bundleMessage = new Message(); bundleMessage.setData(bundle); myServiceHandler.sendMessage(bundleMessage); } public class MyBinder extends Binder { public MyService getService() { return MyService.this; } public void setCallbackHandler(Handler myActivityHandler) { myServiceHandler = myActivityHandler; } public void removeCallbackHandler() { myServiceHandler = null; } } } Tab1.java package com.example.tabs; import android.app.Activity; import android.app.Fragment; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Tab1 extends Fragment { public static String TAG = Tab1.class.getClass().getSimpleName(); private static TextView tvText; private EditText editText; private static MyService.MyBinder myBinder; private static Intent myServiceIntent; private static MyService myService; private static ServiceConnection myConnection = new ServiceConnection() { public void onServiceConnected(ComponentName name, IBinder binder) { myBinder = (MyService.MyBinder) binder; myService = myBinder.getService(); myBinder.setCallbackHandler(myServiceHandler); } public void onServiceDisconnected(ComponentName name) { myService = null; myBinder = null; } }; /** Callbackhandler. */ private static Handler myServiceHandler = new Handler() { public void handleMessage(Message message) { super.handleMessage(message); Bundle bundle = message.getData(); if (bundle != null) { String text = bundle.getString("Text1", ""); if (!text.equals("")) { tvText.setText(text); } } } }; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.tab1, container, false); tvText = (TextView) view.findViewById(R.id.tv_tab1); editText = (EditText) view.findViewById(R.id.editText1); Button btn1 = (Button) view.findViewById(R.id.btn_change_text_1); btn1.setOnClickListener(new OnClickListener() { public void onClick(View v) { myService.sendMessage(String.valueOf(editText.getText()), 1); } }); return view; } @Override public void onAttach(Activity activity) { super.onAttach(activity); myServiceIntent = new Intent(activity, MyService.class); activity.bindService(myServiceIntent, myConnection, Context.BIND_AUTO_CREATE); } @Override public void onDetach() { super.onDetach(); getActivity().unbindService(myConnection); } } Tab2.java package com.example.tabs; import android.app.Activity; import android.app.Fragment; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Tab2 extends Fragment { public static String TAG = Tab2.class.getClass().getSimpleName(); private static TextView tvText; private EditText editText; private static MyService.MyBinder myBinder; private static Intent myServiceIntent; private static MyService myService; private static ServiceConnection myConnection = new ServiceConnection() { public void onServiceConnected(ComponentName name, IBinder binder) { myBinder = (MyService.MyBinder) binder; myService = myBinder.getService(); myBinder.setCallbackHandler(myServiceHandler); } public void onServiceDisconnected(ComponentName name) { myService = null; myBinder = null; } }; /** Callbackhandler. */ private static Handler myServiceHandler = new Handler() { public void handleMessage(Message message) { super.handleMessage(message); Bundle bundle = message.getData(); if (bundle != null) { String text = bundle.getString("Text1", ""); if (!text.equals("")) { tvText.setText(text); } } } }; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.tab2, container, false); tvText = (TextView) view.findViewById(R.id.tv_tab2); editText = (EditText) view.findViewById(R.id.editText2); Button btn2 = (Button) view.findViewById(R.id.btn_change_text_2); btn2.setOnClickListener(new OnClickListener() { public void onClick(View v) { myService.sendMessage(String.valueOf(editText.getText()), 2); } }); return view; } @Override public void onAttach(Activity activity) { super.onAttach(activity); myServiceIntent = new Intent(activity, MyService.class); activity.bindService(myServiceIntent, myConnection, Context.BIND_AUTO_CREATE); } @Override public void onDetach() { super.onDetach(); getActivity().unbindService(myConnection); } } main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/black" android:orientation="vertical" > </LinearLayout> tab1.xml <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:layout_gravity="center" android:gravity="center" android:orientation="vertical" > <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:ems="10" android:inputType="text" > <requestFocus /> </EditText> <Button android:id="@+id/btn_change_text_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:text="Change text" /> <TextView android:id="@+id/tv_tab1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TAB1\nTAB1\nTAB1" /> </LinearLayout> tab2.xml <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:layout_gravity="center" android:gravity="center" android:orientation="vertical" > <EditText android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:ems="10" android:inputType="text" > <requestFocus /> </EditText> <Button android:id="@+id/btn_change_text_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:text="Change text" /> <TextView android:id="@+id/tv_tab2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:text="TAB2\nTAB2\nTAB2" /> </LinearLayout> AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tabs" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="TabsPlusService" android:theme="@android:style/Theme.Holo" > <activity android:name="com.example.tabs.MyActivity" android:configChanges="orientation|keyboardHidden|screenSize" android:label="TabsPlusService" android:theme="@android:style/Theme.Holo" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <service android:name=".MyService" android:enabled="true" > </service> </application> </manifest>

    Read the article

  • Android Title bar leaving space in when application is resumed

    - by user466607
    I am using a Tab Host in my Android App. I have the Titlebar hidden. When I leave the App and resume to it, I have some strange behaviour. If I resume to a tab using a list activity with listView.setAdapter, the title bar is hidden and the space it takes up is consumed by the App. However, if I resume to any tab without the listView.setAdapter, the Titlebar is hidden, but space which was used by it is left behind. This is pushes my tabs (which are positioned at the bottom of the screen) off the screen. The space is once again consumed by my app if I then change to any other tab. I have tried to invalidate most of the obvious Views in my App without and success. Below is my tab_activity xml. many thanks <?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="fill_parent"> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" /> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0" /> </LinearLayout> </TabHost> </LinearLayout> Here is the Manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.tar.projectx" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" /> <application android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <activity android:name=".Splash" android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" android:label="@string/app_name" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="SearchActivity" android:label="SearchActivity" android:screenOrientation="portrait"></activity> <activity android:name="SearchListActivity" android:label="SearchListActivity" android:screenOrientation="portrait"></activity> <activity android:name="ContactActivity" android:label="ContactActivity" android:screenOrientation="portrait"></activity> </application> </manifest> Interestingly, if I use the code below in the onResume method of my mainActivity which holds the tabhost, once the toast disappears, the view is refreshed and the space at the top is taken up by my app again. Obviously, this isn't much of a fix, but may help someone understand what is happening. @Override protected void onResume() { super.onResume(); Toast.makeText(this, "Welcome Back", Toast.LENGTH_LONG).show(); }

    Read the article

  • Video Recording Not Working in ICS

    - by Nirav Ranpara
    I have implement code Record video in Android Phone . This code is working in 2.2 , 2.3 . not in ICS But when I checked in ICS code is not working ? here I posted code and xml file. videorecord.java import java.io.File; import java.io.IOException; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.hardware.Camera; import android.media.CamcorderProfile; import android.media.MediaRecorder; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Environment; import android.util.Log; import android.view.Display; import android.view.KeyEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class videorecord extends Activity{ SharedPreferences.Editor pre; String filename; CountDownTimer t; private Camera myCamera; private MyCameraSurfaceView myCameraSurfaceView; private MediaRecorder mediaRecorder; Integer cnt=0; LinearLayout myButton; TextView myButton1; SurfaceHolder surfaceHolder; boolean recording; private TextView txtcount; private ImageView btnplay; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); recording = false; setContentView(R.layout.videorecord); init(); myCamera = getCameraInstance(); if(myCamera == null){ } myCameraSurfaceView = new MyCameraSurfaceView(this, myCamera); FrameLayout myCameraPreview = (FrameLayout)findViewById(R.id.videoview); Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); myCameraSurfaceView.setLayoutParams(new LinearLayout.LayoutParams(width, height-60)); myCameraPreview.addView(myCameraSurfaceView); myButton = (LinearLayout)findViewById(R.id.mybutton); btnplay.setOnClickListener(myButtonOnClickListener); } private void init() { txtcount = (TextView) findViewById(R.id.txtcounter); //myButton1 = (TextView) findViewById(R.id.mybutton1); btnplay = (ImageView)findViewById(R.id.btnplay); t = new CountDownTimer( Long.MAX_VALUE , 1000) { @Override public void onTick(long millisUntilFinished) { cnt++; String time = new Integer(cnt).toString(); long millis = cnt; int seconds = (int) (millis / 60); int minutes = seconds / 60; seconds = seconds % 60; txtcount.setText(String.format("%d:%02d:%02d", minutes, seconds,millis)); } @Override public void onFinish() { } }; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { if(recording) { new AlertDialog.Builder(videorecord.this).setTitle("Do you want to save Video ?") .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { filename(); //finish(); } }).setNegativeButton("Cancle", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }).show(); } else { if ((keyCode == KeyEvent.KEYCODE_BACK)) { //Intent homeIntent= new Intent(Intent.ACTION_MAIN); //homeIntent.addCategory(Intent.CATEGORY_HOME); //homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); //startActivity(homeIntent); //this.finishActivity(1); finish(); } //moveTaskToBack(true); // finish(); return super.onKeyDown(keyCode, event); } } else { // Toast.makeText(getApplicationContext(), "asd", Toast.LENGTH_LONG).show(); android.os.Process.killProcess(android.os.Process.myPid()) ; } return super.onKeyDown(keyCode, event); } ImageView.OnClickListener myButtonOnClickListener = new ImageView.OnClickListener(){ public void onClick(View v) { if(recording){ Log.e("Record error", "error in recording ."); mediaRecorder.stop(); t.cancel(); filename(); releaseMediaRecorder(); }else{ releaseCamera(); Log.e("Record Stop error", "error in recording ."); // if(!prepareMediaRecorder()){ prepareMediaRecorder(); finish(); } mediaRecorder.start(); recording = true; // myButton1.setText("STOP Recording"); // btnplay.setImageResource(android.R.drawable.ic_media_pause); btnplay.setImageResource(R.drawable.stoprec); t.start(); } }}; private Camera getCameraInstance(){ Camera c = null; try { c = Camera.open(); } catch (Exception e){ } return c; } private void filename() { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Save Video"); alert.setMessage("Enter File Name"); final EditText input = new EditText(this); alert.setView(input); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { if(input.getText().length()>=1) { filename = input.getText().toString(); File sdcard = new File(Environment.getExternalStorageDirectory() + "/VideoRecord"); File from = new File(sdcard,"null.mp4"); File to = new File(sdcard,filename+".mp4"); from.renameTo(to); SharedPreferences sp = videorecord.this.getSharedPreferences("data", MODE_WORLD_WRITEABLE); pre = sp.edit(); pre.clear(); pre.commit(); pre.putString("lastvideo", filename+".mp4"); pre.commit(); //btnplay.setImageResource(android.R.drawable.ic_media_play); btnplay.setImageResource(R.drawable.startrec); // Intent intent = new Intent(videorecord.this,StopVidoWatch_Activity.class); // startActivity(intent); Intent myIntent = new Intent(getApplicationContext(), StopVidoWatch_Activity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(myIntent); } else { filename(); } } }); alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Intent intent = new Intent(videorecord.this,StopVidoWatch_Activity.class); // startActivity(intent); File file = new File(Environment.getExternalStorageDirectory() + "/VideoRecord/null.mp4"); //boolean deleted = file.delete(); file.delete(); finish(); } }); alert.show(); } private boolean prepareMediaRecorder(){ myCamera = getCameraInstance(); mediaRecorder = new MediaRecorder(); myCamera.unlock(); mediaRecorder.setCamera(myCamera); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH)); File folder = new File(Environment.getExternalStorageDirectory() + "/VideoRecord"); boolean success = false; if (!folder.exists()) { success = folder.mkdir(); } if (!success) { } else { } mediaRecorder.setOutputFile("/sdcard/VideoRecord/"+filename+".mp4"); mediaRecorder.setMaxDuration(60000); mediaRecorder.setMaxFileSize(5000000); Display display = getWindowManager().getDefaultDisplay(); int width = display.getHeight(); int height = display.getWidth(); String s = new String(); s= s.valueOf(width); String s1 = new String(); s1= s1.valueOf(height); // Toast.makeText(videorecord.this, "Width : " + s , Toast.LENGTH_LONG).show(); // Toast.makeText(videorecord.this, "Height : " + s1 , Toast.LENGTH_LONG).show(); mediaRecorder.setVideoSize(height, width); mediaRecorder.setPreviewDisplay(myCameraSurfaceView.getHolder().getSurface()); try { mediaRecorder.prepare(); } catch (IllegalStateException e) { releaseMediaRecorder(); return false; } catch (IOException e) { releaseMediaRecorder(); return false; } return true; } @Override protected void onPause() { super.onPause(); releaseMediaRecorder(); releaseCamera(); } private void releaseMediaRecorder() { if (mediaRecorder != null) { mediaRecorder.reset(); mediaRecorder.release(); mediaRecorder = null; myCamera.lock(); } } private void releaseCamera(){ if (myCamera != null){ myCamera.release(); myCamera = null; } } public class MyCameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback{ private SurfaceHolder mHolder; private Camera mCamera; public MyCameraSurfaceView(Context context, Camera camera) { super(context); mCamera = camera; mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceChanged(SurfaceHolder holder, int format, int weight, int height) { if (mHolder.getSurface() == null){ return; } try { mCamera.stopPreview(); } catch (Exception e){ } try { mCamera.setPreviewDisplay(mHolder); mCamera.startPreview(); } catch (Exception e){ } } public void surfaceCreated(SurfaceHolder holder) { try { mCamera.setPreviewDisplay(holder); mCamera.startPreview(); } catch (IOException e) { } } public void surfaceDestroyed(SurfaceHolder holder) { } } } videorecord.xml <?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="fill_parent" > <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@+id/videoview" android:layout_width="fill_parent" android:layout_height="fill_parent"></FrameLayout> <LinearLayout android:id="@+id/mybutton" android:layout_width="fill_parent" android:layout_marginBottom="0dip" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0" > <!-- <TextView android:text="START Recording" android:id="@+id/mybutton1" android:layout_height="wrap_content" android:layout_width="wrap_content" style="@style/savestyle" android:layout_weight="1" android:gravity="left" > </TextView> --> <ImageView android:layout_height="wrap_content" android:id="@+id/btnplay" android:padding="5dip" android:background="#A0000000" android:textColor="#ffffffff" android:layout_width="wrap_content" android:src="@drawable/startrec" /> </LinearLayout> <TextView android:text="00:00:00" android:id="@+id/txtcounter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|bottom" android:padding="5dip" android:background="#A0000000" android:textColor="#ffffffff" /> </FrameLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/bgcolor" > <LinearLayout android:layout_above="@+id/mybutton" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" > </LinearLayout> </RelativeLayout> </LinearLayout>

    Read the article

  • Newbie: How to set attribute of the relative layout in my case??

    - by Leem
    I would like to divide my screen into 4 equal areas like ?.Each one of the four area is a linear layout. I tried to use relative layout to hold four linear layout like below: <?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"> <LinearLayout android:id="@+id/up_left_area" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#ffff66" > <TextView android:id="@+id/label1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="UP LEFT"/> </LinearLayout> <LinearLayout android:id="@+id/up_right_area" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/up_left_area" android:background="#ccffff"> <TextView android:id="@+id/label2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="UP RIGHT"/> </LinearLayout> <LinearLayout android:id="@+id/down_left_area" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_below="@id/up_left_area" android:background="#66cc33" > <TextView android:id="@+id/label3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="DOWN LEFT"/> </LinearLayout> <LinearLayout android:id="@+id/down_right_area" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/up_right_area" android:layout_toRightOf="@id/down_left_area" android:background="#cc6600"> <TextView android:id="@+id/label4" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="DOWN RIGHT"/> </LinearLayout> </RelativeLayout> With the above xml layout code, I do get 4 areas on the screen, but they are not equal sized. How to modify my code to have equal sized 4 areas on the screen like ? ?

    Read the article

  • Unable to start Android emulator > 1.5

    - by Cicatrice
    Hi ! I got this trace when I tried to launch android 1.6 or 2.1. Android 1.5 is working fine. I tried to reinstall each SDK, but there is no way to get it working. I created those AVD with Eclipse plugin. geo@geo-laptop:~> android/android-sdk-linux_86/tools/emulator -avd a16 *** glibc detected *** android/android-sdk-linux_86/tools/emulator: free(): invalid pointer: 0x45454545 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6df7b)[0xb748cf7b] /lib/libc.so.6(cfree+0xd9)[0xb7491ac9] android/android-sdk-linux_86/tools/emulator[0x80db20c] android/android-sdk-linux_86/tools/emulator[0x840eb38] ======= Memory map: ======== 08048000-08246000 r-xp 00000000 08:06 5693701 /home/geo/android/android-sdk-linux_86/tools/emulator 08246000-08249000 rw-p 001fd000 08:06 5693701 /home/geo/android/android-sdk-linux_86/tools/emulator 08249000-08445000 rw-p 00000000 00:00 0 08445000-08447000 rwxp 00000000 00:00 0 08447000-0874c000 rw-p 00000000 00:00 0 [heap] ad8e9000-ada86000 rw-s 00000000 00:04 85229580 /SYSV00000000 (deleted) ada86000-adced000 rw-p 00000000 00:00 0 adced000-add0d000 rw-s 00000000 00:04 84770825 /SYSV0056a4d6 (deleted) add0d000-adde4000 r-xp 00000000 08:05 22591 /usr/lib/libasound.so.2.0.0 adde4000-adde5000 ---p 000d7000 08:05 22591 /usr/lib/libasound.so.2.0.0 adde5000-adde8000 r--p 000d7000 08:05 22591 /usr/lib/libasound.so.2.0.0 adde8000-adde9000 rw-p 000da000 08:05 22591 /usr/lib/libasound.so.2.0.0 adde9000-ade09000 rw-s 00000000 00:05 3268 /dev/snd/pcmC0D0p ade09000-b3e0b000 rw-p 00000000 00:00 0 b3e0b000-b3e0c000 ---p 00000000 00:00 0 b3e0c000-b55cd000 rw-p 00000000 00:00 0 b55cd000-b6dcd000 rwxp 00000000 00:00 0 b6dcd000-b6ea3000 rw-p 00000000 00:00 0 b6ea4000-b7205000 rw-p 00000000 00:00 0 b7205000-b7209000 r-xp 00000000 08:05 22491 /usr/lib/libXfixes.so.3.1.0 b7209000-b720a000 r--p 00003000 08:05 22491 /usr/lib/libXfixes.so.3.1.0 b720a000-b720b000 rw-p 00004000 08:05 22491 /usr/lib/libXfixes.so.3.1.0 b7212000-b7222000 rw-s 00000000 00:05 3269 /dev/snd/pcmC0D0c b7222000-b7226000 r-xp 00000000 08:05 22588 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so b7226000-b7227000 r--p 00003000 08:05 22588 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so b7227000-b7228000 rw-p 00004000 08:05 22588 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so b7228000-b7229000 rw-s 81000000 00:05 3268 /dev/snd/pcmC0D0p b7229000-b722a000 r--s 80000000 00:05 3268 /dev/snd/pcmC0D0p b722a000-b722b000 rw-s 00000000 00:04 84738056 /SYSV0056a4d5 (deleted) b722b000-b7276000 r--p 00000000 08:05 85242 /var/cache/libx11/compose/l4_024_313cb605_00280cc0 b7276000-b72b5000 r--p 00000000 08:05 20724 /usr/lib/locale/en_US.utf8/LC_CTYPE b72b5000-b73d2000 r--p 00000000 08:05 101088 /usr/lib/locale/en_US.utf8/LC_COLLATE b73d2000-b73d9000 r-xp 00000000 08:05 22991 /usr/lib/libXrandr.so.2.2.0 b73d9000-b73da000 r--p 00006000 08:05 22991 /usr/lib/libXrandr.so.2.2.0 b73da000-b73db000 rw-p 00007000 08:05 22991 /usr/lib/libXrandr.so.2.2.0 b73db000-b73e4000 r-xp 00000000 08:05 4146 /usr/lib/libXrender.so.1.3.0 b73e4000-b73e5000 r--p 00008000 08:05 4146 /usr/lib/libXrender.so.1.3.0 b73e5000-b73e6000 rw-p 00009000 08:05 4146 /usr/lib/libXrender.so.1.3.0 b73e6000-b73f7000 r-xp 00000000 08:05 3705 /usr/lib/libXext.so.6.4.0 b73f7000-b73f8000 r--p 00010000 08:05 3705 /usr/lib/libXext.so.6.4.0 b73f8000-b73f9000 rw-p 00011000 08:05 3705 /usr/lib/libXext.so.6.4.0 b73f9000-b73fa000 rw-p 00000000 00:00 0 b73fa000-b73fc000 r-xp 00000000 08:05 8573 /usr/lib/libXau.so.6.0.0 b73fc000-b73fd000 r--p 00001000 08:05 8573 /usr/lib/libXau.so.6.0.0 b73fd000-b73fe000 rw-p 00002000 08:05 8573 /usr/lib/libXau.so.6.0.0 b73fe000-b73ff000 rw-p 00000000 00:00 0 b73ff000-b741d000 r-xp 00000000 08:05 3862 /usr/lib/libxcb.so.1.1.0 b741d000-b741e000 r--p 0001d000 08:05 3862 /usr/lib/libxcb.so.1.1.0 b741e000-b741f000 rw-p 0001e000 08:05 3862 /usr/lib/libxcb.so.1.1.0 b741f000-b7583000 r-xp 00000000 08:05 39690 /lib/libc-2.11.1.so b7583000-b7584000 ---p 00164000 08:05 39690 /lib/libc-2.11.1.so b7584000-b7586000 r--p 00164000 08:05 39690 /lib/libc-2.11.1.so b7586000-b7587000 rw-p 00166000 08:05 39690 /lib/libc-2.11.1.so b7587000-b758a000 rw-p 00000000 00:00 0 b758a000-b75a6000 r-xp 00000000 08:05 11519 /lib/libgcc_s.so.1 b75a6000-b75a7000 r--p 0001b000 08:05 11519 /lib/libgcc_s.so.1 b75a7000-b75a8000 rw-p 0001c000 08:05 11519 /lib/libgcc_s.so.1 b75a8000-b768b000 r-xp 00000000 08:05 85419 /usr/lib/libstdc++.so.6.0.14 b768b000-b768c000 ---p 000e3000 08:05 85419 /usr/lib/libstdc++.so.6.0.14 b768c000-b7690000 r--p 000e3000 08:05 85419 /usr/lib/libstdc++.so.6.0.14 b7690000-b7691000 rw-p 000e7000 08:05 85419 /usr/lib/libstdc++.so.6.0.14 b7691000-b7698000 rw-p 00000000 00:00 0 b7698000-b76c0000 r-xp 00000000 08:05 39698 /lib/libm-2.11.1.so b76c0000-b76c1000 r--p 00027000 08:05 39698 /lib/libm-2.11.1.so b76c1000-b76c2000 rw-p 00028000 08:05 39698 /lib/libm-2.11.1.so b76c2000-b76d9000 r-xp 00000000 08:05 39716 /lib/libpthread-2.11.1.so b76d9000-b76da000 r--p 00016000 08:05 39716 /lib/libpthread-2.11.1.so b76da000-b76db000 rw-p 00017000 08:05 39716 /lib/libpthread-2.11.1.so b76db000-b76de000 rw-p 00000000 00:00 0 b76de000-b76e1000 r-xp 00000000 08:05 39696 /lib/libdl-2.11.1.so b76e1000-b76e2000 r--p 00002000 08:05 39696 /lib/libdl-2.11.1.so b76e2000-b76e3000 rw-p 00003000 08:05 39696 /lib/libdl-2.11.1.so b76e3000-b76eb000 r-xp 00000000 08:05 39720 /lib/librt-2.11.1.so b76eb000-b76ec000 r--p 00007000 08:05 39720 /lib/librt-2.11.1.so b76ec000-b76ed000 rw-p 00008000 08:05 39720 /lib/librt-2.11.1.so b76ed000-b76ef000 r-xp 00000000 08:05 39725 /lib/libutil-2.11.1.so b76ef000-b76f0000 r--p 00001000 08:05 39725 /lib/libutil-2.11.1.so b76f0000-b76f1000 rw-p 00002000 08:05 39725 /lib/libutil-2.11.1.so b76f1000-b7828000 r-xp 00000000 08:05 4550 /usr/lib/libX11.so.6.3.0 b7828000-b7829000 r--p 00136000 08:05 4550 /usr/lib/libX11.so.6.3.0 b7829000-b782c000 rw-p 00137000 08:05 4550 /usr/lib/libX11.so.6.3.0 b782c000-b782d000 rw-s 81000000 00:05 3269 /dev/snd/pcmC0D0c b782d000-b782e000 r--s 80000000 00:05 3269 /dev/snd/pcmC0D0c b782e000-b782f000 rw-s 00000000 00:04 82771979 /SYSV0056a4d7 (deleted) b782f000-b7839000 r-xp 00000000 08:05 22208 /usr/lib/libXcursor.so.1.0.2 b7839000-b783a000 r--p 00009000 08:05 22208 /usr/lib/libXcursor.so.1.0.2 b783a000-b783b000 rw-p 0000a000 08:05 22208 /usr/lib/libXcursor.so.1.0.2 b783b000-b783c000 r--p 00000000 08:05 20194 /usr/lib/locale/en_US.utf8/LC_NUMERIC b783c000-b783d000 r--p 00000000 08:05 100190 /usr/lib/locale/en_US.utf8/LC_TIME b783d000-b783e000 r--p 00000000 08:05 100189 /usr/lib/locale/en_US.utf8/LC_MONETARY[1] 24082 abort android/android-sdk-linux_86/tools/emulator -avd a16

    Read the article

  • Android RelativeLayout fill_parent unexpected behavior in a ListView with varying row heights

    - by Jameel Al-Aziz
    I'm currently working on a small update to a project and I'm having an issue with Relative_Layout and fill_parent in a list view. I'm trying to insert a divider between two sections in each row, much like the divider in the call log of the default dialer. I checked out the Android source code to see how they did it, but I encountered a problem when replicating their solution. To start, here is my row item layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:padding="10dip" android:layout_height="fill_parent" android:maxHeight="64dip" android:minHeight="?android:attr/listPreferredItemHeight"> <ImageView android:id="@+id/infoimage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:src="@drawable/info_icon_big" android:layout_alignParentRight="true" android:layout_centerVertical="true"/> <View android:id="@+id/divider" android:background="@drawable/divider_vertical_dark" android:layout_marginLeft="11dip" android:layout_toLeftOf="@+id/infoimage" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_marginRight="4dip"/> <TextView android:id="@+id/TextView01" android:textAppearance="?android:attr/textAppearanceLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toRightOf="@+id/ImageView01" android:layout_toLeftOf="@+id/divider" android:gravity="left|center_vertical" android:layout_marginLeft="4dip" android:layout_marginRight="4dip"/> <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:background="@drawable/bborder" android:layout_centerVertical="true"/> </RelativeLayout> The issue I'm facing is that each row has a thumbnail of varying height (ImageView01). If I set the RelativeLayout's layout_height property to fill_parent, the divider does not scale vertically to fill the row (it just remains a 1px dot). If I set layout_height to "?android:attr/listPreferredItemHeight", the divider fills the row, but the thumbnails shrink. I've done some debugging in the getView() method of the adapter, and it seems that the divider's height is not being set properly once the row has it's proper height. Here is a portion of the getView() method: public View getView(int position, View view, ViewGroup parent) { if (view == null) { view = inflater.inflate(R.layout.tag_list_item, parent, false); } The rest of the method simply sets the appropriate text and images for the row. Also, I create the inflater object in the adapter's constructor with: inflater = LayoutInflater.from(context); Am I missing something essential? Or does fill_parent just not work with dynamic heights?

    Read the article

  • Android ScrollView Not Scrolling Correctly

    - by user3133534
    I've been making my way through thenewboston's android tutorials and I'm stuck on number 35. There is supposed to be a scroll bar that takes up a weight of 30 at the top of the app. There are 6 textview/edittext field groups in the code, but I deleted 5 for simplicity. My problem is that all of the text and text boxes appear on the page and are not confined to the given weight (they all just show up on the page). Has anyone else had this problem or know how to fix it? Please, I'm new to stackoverflow. If you think this is a stupid question, please explain to me why and how I can ask it better. Here is what it looks like: http://imgur.com/gJmOgqk <?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:orientation="vertical" android:weightSum="100" > <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="30" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" > </EditText> </LinearLayout> </ScrollView> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="40" android:orientation="vertical" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="30" android:orientation="vertical" > <AnalogClock android:id="@+id/analogClock1" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout>

    Read the article

  • Android RatingBar weirdness: Whenever I add a RatingBar to my layout, a bunch of the generated tags,

    - by Rben
    Whenever I use a RatingBar view in my layout, I suddenly get all kinds of compile errors. I'm using Android 2.0, but I've also tried 2.0.1, and 2.1, without joy. I also get a message: Shader 'android.graphics.BitmapShader' is not supported in Layout Editor, and an odd warning which may or maynot be related: warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. I've tried using the RatingBar both within a tablelayout and outside it, but it behaves the same way. This is very puzzling and frustrating. Please help if you can. Sincerely, Ray Here's the XML: <!-- Created By --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:text="Created by: " android:id="@+id/gi_created_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" /> <TextView android:text="Slartibartfast" android:id="@+id/gi_created" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </TableRow> <!-- Verification --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:id="@+id/gi_verification_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/GameInfoVerificationLabelText" /> <TextView android:id="@+id/gi_verification" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="HonorSystem" /> </TableRow> <!-- Player Rating Label --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" android:text="@string/GameInfoPlayerRatingLabel" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text=" " /> </TableRow> -- <!-- Times played --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:id="@+id/gi_times_played_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/GameInfoTimesPlayedLabel" /> <TextView android:id="@+id/gi_times_played" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="999" /> </TableRow> <!-- Total Players --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:id="@+id/gi_total_players_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/GameInfoTotalPlayerCountLabel" /> <TextView android:id="@+id/gi_total_players" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="999" /> </TableRow> <!-- Total Cancelations --> <TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:id="@+id/gi_total_cancelations_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="@string/GameInfoTotalCancelsLabel" /> <TextView android:id="@+id/gi_total_cancels" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="999" /> </TableRow> <RatingBar android:id="@+/gi_player_rating" style="?android:attr/ratingBarStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="2" android:isIndicator="true" android:numStars="5" android:rating="3" android:stepSize="1" android:layout_gravity="center_vertical" /> </TableRow>

    Read the article

  • Problem with Android Layout

    - by Ryan
    I'm having a very hard time getting the 2 buttons in the 2nd child linearlayout to display as I want them to... I want them centered on screen but they appear left-aligned. Can anyone help me with this? <?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:background="@color/black" android:orientation="vertical"> <LinearLayout android:id="@+id/splash" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <ImageView android:id="@+id/imageLogo1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:cropToPadding="true" android:scaleType="fitXY" android:src="@drawable/isi_logo" android:paddingLeft="50sp" android:paddingRight="50sp" android:paddingTop="20sp"/> <ImageView android:id="@+id/imageLogo2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:cropToPadding="true" android:scaleType="fitXY" android:src="@drawable/sa_logo" android:paddingLeft="100sp" android:paddingRight="100sp" android:paddingBottom="20sp"/> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center"> <Button android:id="@+id/buttonScores" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="100sp" android:text="@string/scores"/> <Button android:id="@+id/buttonStart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="100sp" android:text="@string/test"/> </LinearLayout> </LinearLayout>

    Read the article

  • Android orientation change causes ImageView to dissapear

    - by Jarrod Smith
    Below is my layout for the row template in a SimpleCursorAdapter. The ImageView with id next_arrow disappears on orientation change. If I replace @drawable/arrow with @drawable/icon (copy of the standard sym_def_app_icon) it works fine. I thought it might be somehow related to the icons being of different dimensions, but I resized @drawable/icon to be the exact same dimensions as the arrow and it still worked fine while the arrow didn't. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="90dp" android:background="@drawable/product_list_divider" android:paddingTop="10dp"> <ImageView android:src="@drawable/ninja_20_65" android:id="@+id/category_icon" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginTop="3dp"/> <LinearLayout android:orientation="vertical" android:layout_weight="5" android:layout_width="0dp" android:layout_height="wrap_content"> <TextView android:id="@+id/category_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Name" style="@style/CategoryHeading" android:layout_marginTop="5dp"/> <TextView android:id="@+id/category_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Description" style="@style/CategoryDescription"/> </LinearLayout> <ImageView android:src="@drawable/arrow" android:layout_weight="1" android:layout_width="0dp" android:layout_marginRight="10dp" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:id="@+id/next_arrow"/> </LinearLayout>

    Read the article

  • Weight doesn't work in a custom android component

    - by RCB
    I wanted to create a custom bottom button bar layout, I've created a xml file : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@android:style/ButtonBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="0dp" > <Button android:id="@+id/media_menu_button" style="?android:attr/buttonStyleSmall" android:layout_width="0dp" android:layout_height="match_parent" android:layout_margin="0dp" android:layout_weight="1" android:text="@string/media_menu_button" /> <Button android:id="@+id/scenario_menu_button" style="?android:attr/buttonStyleSmall" android:layout_width="0dp" android:layout_height="match_parent" android:layout_margin="0dp" android:layout_weight="1" android:text="@string/scenario_menu_button" /> <Button android:id="@+id/rooms_menu_button" style="?android:attr/buttonStyleSmall" android:layout_width="0dp" android:layout_height="match_parent" android:layout_margin="0dp" android:layout_weight="1" android:text="@string/rooms_menu_button" /> <Button android:id="@+id/shortcut_menu_button" style="?android:attr/buttonStyleSmall" android:layout_width="0dp" android:layout_height="match_parent" android:layout_margin="0dp" android:layout_weight="1" android:text="@string/shortcut_menu_button" /> as you can see I've given all the buttons width 0dp and weight of 1. then, I've created a class that extends the linear layout class : public class BeLightBottomBar extends LinearLayout implements OnClickListener { private LayoutInflater mInflater; private Context contexnt; private Button mShortcutMenuButton; private Button mRoomsMenuButton; private Button mScenarioMenuButton; private Button mMediaMenuButton; public BeLightBottomBar(Context context, AttributeSet attrs) { super(context, attrs); //inflate the view this.contexnt = context; mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LinearLayout barView = (LinearLayout) mInflater.inflate(R.layout.belight_bottombar, null); addView(barView); //get all the instances of the components of the bar mShortcutMenuButton = (Button) barView.findViewById(R.id.shortcut_menu_button); mRoomsMenuButton = (Button) barView.findViewById(R.id.rooms_menu_button); mScenarioMenuButton = (Button) barView.findViewById(R.id.scenario_menu_button); mMediaMenuButton = (Button) barView.findViewById(R.id.media_menu_button); //set this as a click listener mShortcutMenuButton.setOnClickListener(this); mRoomsMenuButton.setOnClickListener(this); mScenarioMenuButton.setOnClickListener(this); mMediaMenuButton.setOnClickListener(this); ... ... ... } the problem is when i add this class to the main activity xml <belight.homecontrol.components.BeLightBottomBar android:id="@+id/button_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_margin="0dp" android:padding="0dp" /> the weight stops working, all the buttons are different. and I don't know why !? if I just copy paste the bottom's bar xml code to the main xml file it works fine, the problem only occurs when using it as a whole. P.S. Is it a good practice to create a component this way? Or maybe I'm doing something wrong? Thanks, Dan

    Read the article

  • Android : launching diff activities under TabWidget

    - by rahul
    hiii I am trying to launch activities under each tab. I hav tried with following code public class Tab_Proj1 extends TabActivity { TabHost mTabHost ; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Context context = getApplicationContext(); //mTabHost = (TabHost) this.findViewById(R.id.); mTabHost = getTabHost(); mTabHost.setup(); mTabHost.addTab(mTabHost.newTabSpec("tab_test4") .setIndicator("Contacts") .setContent(new Intent().setClass(context, Tab1Activity.class))); Tab1Activity is extending ListActivity. I m getting exception as:::::: 01-25 11:57:07.352: ERROR/AndroidRuntime(952): Uncaught handler: thread main exiting due to uncaught exception 01-25 11:57:07.382: ERROR/AndroidRuntime(952): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.app.Tab_Proj1/com.android.app.Tab_Proj1.Tab_Proj1}: java.lang.RuntimeException: Could not create tab content because could not find view with id 2131034148 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.os.Handler.dispatchMessage(Handler.java:99) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.os.Looper.loop(Looper.java:123) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.main(ActivityThread.java:3948) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at java.lang.reflect.Method.invokeNative(Native Method) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at java.lang.reflect.Method.invoke(Method.java:521) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at dalvik.system.NativeStart.main(Native Method) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): Caused by: java.lang.RuntimeException: Could not create tab content because could not find view with id 2131034148 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$ViewIdContentStrategy.(TabHost.java:539) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$ViewIdContentStrategy.(TabHost.java:530) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$TabSpec.setContent(TabHost.java:417) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.app.Tab_Proj1.Tab_Proj1.onCreate(Tab_Proj1.java:52) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231) ====================================================================== Am I going in correct way? If not please help me with some ideas..... thanks

    Read the article

  • Android - creating a custom preferences activity screen

    - by Bill Osuch
    Android applications can maintain their own internal preferences (and allow them to be modified by users) with very little coding. In fact, you don't even need to write an code to explicitly save these preferences, it's all handled automatically! Create a new Android project, with an intial activity title Main. Create two more activities: ShowPrefs, which extends Activity Set Prefs, which extends PreferenceActivity Add these two to your AndroidManifest.xml file: <activity android:name=".SetPrefs"></activity> <activity android:name=".ShowPrefs"></activity> Now we'll work on fleshing out each activity. First, open up the main.xml layout file and add a couple of buttons to it: <?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="fill_parent"> <Button android:text="Edit Preferences"    android:id="@+id/prefButton"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_gravity="center_horizontal"/> <Button android:text="Show Preferences"    android:id="@+id/showButton"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_gravity="center_horizontal"/> </LinearLayout> Next, create a couple button listeners in Main.java to handle the clicks and start the other activities: Button editPrefs = (Button) findViewById(R.id.prefButton);       editPrefs.setOnClickListener(new View.OnClickListener() {              public void onClick(View view) {                  Intent myIntent = new Intent(view.getContext(), SetPrefs.class);                  startActivityForResult(myIntent, 0);              }      });           Button showPrefs = (Button) findViewById(R.id.showButton);      showPrefs.setOnClickListener(new View.OnClickListener() {              public void onClick(View view) {                  Intent myIntent = new Intent(view.getContext(), ShowPrefs.class);                  startActivityForResult(myIntent, 0);              }      }); Now, we'll create the actual preferences layout. You'll need to create a file called preferences.xml inside res/xml, and you'll likely have to create the xml directory as well. Add the following xml: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> </PreferenceScreen> First we'll add a category, which is just a way to group similar preferences... sort of a horizontal bar. Add this inside the PreferenceScreen tags: <PreferenceCategory android:title="First Category"> </PreferenceCategory> Now add a Checkbox and an Edittext box (inside the PreferenceCategory tags): <CheckBoxPreference    android:key="checkboxPref"    android:title="Checkbox Preference"    android:summary="This preference can be true or false"    android:defaultValue="false"/> <EditTextPreference    android:key="editTextPref"    android:title="EditText Preference"    android:summary="This allows you to enter a string"    android:defaultValue="Nothing"/> The key is how you will refer to the preference in code, the title is the large text that will be displayed, and the summary is the smaller text (this will make sense when you see it). Let's say we've got a second group of preferences that apply to a different part of the app. Add a new category just below the first one: <PreferenceCategory android:title="Second Category"> </PreferenceCategory> In there we'll a list with radio buttons, so add: <ListPreference    android:key="listPref"    android:title="List Preference"    android:summary="This preference lets you select an item in a array"    android:entries="@array/listArray"    android:entryValues="@array/listValues" /> When complete, your full xml file should look like this: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">  <PreferenceCategory android:title="First Category"> <CheckBoxPreference    android:key="checkboxPref"    android:title="Checkbox Preference"    android:summary="This preference can be true or false"    android:defaultValue="false"/> <EditTextPreference    android:key="editTextPref"    android:title="EditText Preference"    android:summary="This allows you to enter a string"    android:defaultValue="Nothing"/>  </PreferenceCategory>  <PreferenceCategory android:title="Second Category">   <ListPreference    android:key="listPref"    android:title="List Preference"    android:summary="This preference lets you select an item in a array"    android:entries="@array/listArray"    android:entryValues="@array/listValues" />  </PreferenceCategory> </PreferenceScreen> However, when you try to save it, you'll get an error because you're missing your array definition. To fix this, add a file called arrays.xml in res/values, and paste in the following: <?xml version="1.0" encoding="utf-8"?> <resources>  <string-array name="listArray">      <item>Value 1</item>      <item>Value 2</item>      <item>Value 3</item>  </string-array>  <string-array name="listValues">      <item>1</item>      <item>2</item>      <item>3</item>  </string-array> </resources> Finally (for the preferences screen at least...) add the code that will display the preferences layout to the SetPrefs.java file:  @Override     public void onCreate(Bundle savedInstanceState) {      super.onCreate(savedInstanceState);      addPreferencesFromResource(R.xml.preferences);      } OK, so now we've got an activity that will set preferences, and save them without the need to write custom save code. Let's throw together an activity to work with the saved preferences. Create a new layout called showpreferences.xml and give it three Textviews: <?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="fill_parent"> <TextView   android:id="@+id/textview1"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="textview1"/> <TextView   android:id="@+id/textview2"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="textview2"/> <TextView   android:id="@+id/textview3"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="textview3"/> </LinearLayout> Open up the ShowPrefs.java file and have it use that layout: setContentView(R.layout.showpreferences); Then add the following code to load the DefaultSharedPreferences and display them: SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);    TextView text1 = (TextView)findViewById(R.id.textview1); TextView text2 = (TextView)findViewById(R.id.textview2); TextView text3 = (TextView)findViewById(R.id.textview3);    text1.setText(new Boolean(prefs.getBoolean("checkboxPref", false)).toString()); text2.setText(prefs.getString("editTextPref", "<unset>"));; text3.setText(prefs.getString("listPref", "<unset>")); Fire up the application in the emulator and click the Edit Preferences button. Set various things, click the back button, then the Edit Preferences button again. Notice that your choices have been saved.   Now click the Show Preferences button, and you should see the results of what you set:   There are two more preference types that I did not include here: RingtonePreference - shows a radioGroup that lists your ringtones PreferenceScreen - allows you to embed a second preference screen inside the first - it opens up a new set of preferences when clicked

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >