android-manifest

Child Activity in Android

。_饼干妹妹 提交于 2019-12-21 10:58:01
问题 So I have two Activities. The main is called Main , and the child one is called Child . When a button is clicked in the main activity it triggers the following piece of code: Intent i = new Intent(Main.this, Child.class); Main.this.startActivity(i); That opens the Child activity. As soon as I call finish() or press the back button within the child activity instead of going back to the main one, the app just closes. Can you give me a hint where the problem might be :( P.S. By trial and error I

Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme')

橙三吉。 提交于 2019-12-21 08:54:53
问题 ![give me error : ( ] i tryed every thing ... [2014-11-15 17:56:06 - LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme'). [2014-11-15 17:56:06 - LoginActivity] [2014-11-15 17:56:07 - LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme'

What is manifest file in Android?

白昼怎懂夜的黑 提交于 2019-12-21 07:14:30
问题 Can anybody explain me in simple words what is the use of Manifest file and R.java file in android. Why do we need these files while making an application? 回答1: check this link, http://developer.android.com/guide/topics/manifest/manifest-intro.html Manifest Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it

How force aplication always run in its own task?

て烟熏妆下的殇ゞ 提交于 2019-12-21 06:28:11
问题 I think that App Manager runs my application after installation in wrong way. It runs my applications in its task. When I press HOME and press application icon I runs second task with my application. I tested it. I made two applications App1, App2. App2 has two activities A and B. App1 runs App2 in the simplest way. Intent intent = new Intent(Intent.ACTION_RUN); intent.setComponent(new ComponentName("org.app2.test", "org.app2.test.Screen1")); Test 1. Run App1. App1 runs App2 activity A.

Why I can not set onClickListener for a button in a dialog view?

拥有回忆 提交于 2019-12-21 05:36:14
问题 I have a custom dialog which described below. My Custom Dialog layout ( *my_dialog.xml* ) which only contain a "dismiss" button: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" > <Button android:id="@+id/dismiss_btn" android:layout_width="100dip" android:layout_height="30dip" android:layout_centerHorizontal="true"

Google Play shows - Your device isn't compatible with this version for Samsung Galaxy tab 2 and Google Nexus 7

岁酱吖の 提交于 2019-12-21 05:20:13
问题 When I published my app to Google play store and I tried downloading it on my Google Nexus 7 , I get the message "Your device isn't compatible with this version". My Manifest file is declared like this:- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses

Error while uploading apk to android market

邮差的信 提交于 2019-12-21 05:09:12
问题 I am trying to add my app to the android market. but i am facing the following error: " The file is invalid: W/ResourceType(17963): Failure getting entry for 0x7f050003 (t=4 e=3) in package 0 (error -75) ERROR getting 'android:icon' attribute: attribute is not a string value " My manifest file is: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.shaer.Hadith" android:versionCode="1" android:versionName="1.0" > <uses-sdk

Android Toolbar Title

坚强是说给别人听的谎言 提交于 2019-12-21 04:58:10
问题 Unable to change toolbar title I set title in manifeast.xml & also used setTitle("TITLE"); I set title as History & Reports but it display different title Notifications which is another activity title. I checked manifeast.xml but No change, Can anyone please help me from this. Here is my code public class Nav_HistoryAndReports extends AppCompatActivity { private Toolbar toolbar; private TabLayout tabLayout; private ViewPager viewPager; @Override protected void onCreate(Bundle

Android GPS on or off state

梦想的初衷 提交于 2019-12-21 04:37:19
问题 Is there any way to check if the Android GPS is on or off without any permission, just the state I don't need to toggle it. Thanks 回答1: No. Checking GPS Status on Android requires android.permission.ACCESS_FINE_LOCATION The code to check the status of GPS LocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE ); boolean statusOfGPS = manager.isProviderEnabled(LocationManager.GPS_PROVIDER); 回答2: steps - Create services running in backgroud You require following

How can we change android application icon dynamically in Android

萝らか妹 提交于 2019-12-21 04:27:26
问题 I know that same kind of question has been asked for activity icon, but my question is little bit different. I just wanted to know whether we can set the application icon programmatically, I am not asking to change, I am just asking for setting it. I hope I am clear. <application android:icon="drawable resource"> </application> In the above example I am setting it in manifest file, but instead of manifest can I set it through java code. 回答1: As you can read here http://developer.android.com