|
je te propose de changer le projet...
si tu voudrais tu pourrais jetter un coup d'oeil sur le lien suivant
https://github.com/andreipop/Android-Login-App
interessant
|
|
|
|
|
Hi,
I have just created a default Android Studio project with navigation drawer. The project was created with:
MainActivity.java
NavigationDrawerFragment.java
and
activity_main.xml
fragment_main.xml
fragment_navigation_drawer.xml
does this mean my startup will be an activity not fragment?
Do I need to change it?
I am trying to set the item actions in the navigation drawer like this:
private void selectItem(int position) {
mCurrentSelectedPosition = position;
Fragment fragment = null;
switch (position) {
case 0:
fragment = new WeatherFragment();
break;
case 1:
fragment = new WeatherFragment();
break;
case 2:
fragment = new WeatherFragment();
break;
default:
break;
}
if (mDrawerListView != null) {
mDrawerListView.setItemChecked(position, true);
}
if (mDrawerLayout != null) {
mDrawerLayout.closeDrawer(mFragmentContainerView);
}
if (mCallbacks != null) {
mCallbacks.onNavigationDrawerItemSelected(position);
}
}
so what this line should be:
fragmentManager.beginTransaction().replace(R.id.fragment_main, fragment).commit();
replace an activity or fragment.
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I am new to Android Stuio. I created a project with the default setting and the added a fragment layout then fragment class
I am now getting the following error:
Class requires API level 11 (current min is 8)
on this line:
public class WeatherFragment extends Fragment {
here is my import:
import android.app.Activity;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;;
import android.support.v4.app.FragmentManager;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.support.v4.widget.DrawerLayout;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import android.app.Fragment;
import android.support.v4.app.ListFragment;
and this is my Manifest:
="1.0"="utf-8"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jassim.yallabahrain.app" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.jassim.yallabahrain.app.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Technology News @ www.JassimRahma.com
|
|
|
|
|
Android introduced fragments in Android 3.0 (API level 11), you have to include this users-sdk inside the manifest file
<manifest>
<uses-sdk android:minSdkVersion="11" />
...
</manifest>
Refer:
1. android-fragments[^]
2. manifest-uses-sdk-element[^]
|
|
|
|
|
Go to Android manifest file and Change API level
|
|
|
|
|
Hi,
I am new to this...
I am using Intel XDK
I created a default page in PHP but when I upload it I got:
404: Intel XDK can't find your app Do you have index.html in your application directory?
I tried html page whch redirects to php like this:
<meta http-equiv="Refresh" content="3; url=http://www.jassimrahma.com/yalla.bahrain/index.php" />
but it's just shown as blank page on Android.
I upload the pages on my hot as well and I didn't have any issue there. this is the url
http://www.jassimrahma.com/yalla.bahrain/index.html
how can I solve this please..
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
then how can I do it?
can I use my own editor and make the app ready then use a third party to package it as apk?
which tool help will help?
Technology News @ www.JassimRahma.com
|
|
|
|
|
I do not know other development tool except Intel XDK that can pack web based application to apk (native application).
All other known development tool are java based...
So you can not turn your PHP based web site into an Android application.
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I'm using the code below to create a filled rounded rectangle with border of a view.
The problem is:
1. If Alpha is set high, the bitmap of the view is no longer visible
2. If Alpha is medium, the bitmap of the view is also dulled
I want the foreground to be as the original on top of the background that is controlled by the Alpha value
Bitmap bitmap = getBitmapFromView(view);
Canvas canvas = new Canvas(bitmap);
Paint background = new Paint();
RectF rectF = new RectF(1, 1, bitmap.getWidth() - 2, bitmap.getHeight() - 2);
background.setStyle(Paint.Style.FILL);
background.setColor(BACKGROUND_COLOUR);
background.setAlpha(ALPHA);
canvas.drawRoundRect(rectF, ROUNDING, ROUNDING, background);
background.setStyle(Paint.Style.STROKE);
background.setStrokeWidth(LINE_THICKNESS);
background.setColor(BORDER_COLOUR);
canvas.drawRoundRect(rectF, ROUNDING, ROUNDING, background);
Paint foreground = new Paint();
canvas.drawBitmap(bitmap, 0, 0, foreground);
return bitmap;
|
|
|
|
|
I am trying to use your valuable code but it gives me some errors .
03-31 11:57:20.533: W/dalvikvm(2117): threadid=11: thread exiting with uncaught exception (group=0xa4c35648)
03-31 11:57:20.533: E/AndroidRuntime(2117): FATAL EXCEPTION: Thread-183
03-31 11:57:20.533: E/AndroidRuntime(2117): java.lang.UnsupportedOperationException
03-31 11:57:20.533: E/AndroidRuntime(2117): at java.lang.Thread.stop(Thread.java:1052)
03-31 11:57:20.533: E/AndroidRuntime(2117): at java.lang.Thread.stop(Thread.java:1042)
03-31 11:57:20.533: E/AndroidRuntime(2117): at com.yourname.main.SplashScreen$2.run(SplashScreen.java:59)
What is the problem? I download & run your project dmo so there is no chance to mistake myself .
|
|
|
|
|
No idea I'm afraid without seeing your code...
You need to put a breakpoint at line 59 in SplashScreen.java and see what's going wrong
|
|
|
|
|
comment je peux calculer les nombres des personnes dans une image.
|
|
|
|
|
This is an English-language site. You'll be more likely to get an answer if you post in English!
Il s'agit d'un site en anglais. Vous aurez plus de chances d'obtenir une réponse si vous postez en anglais!
http://translate.google.com/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
how to count the number of people in an image using opencv, please help me
|
|
|
|
|
Hi,
I have a requirement to read epub file and need to enable text to speech functionality that means when i click on some speak button the text which is displaying on page has to be select and read aloud about that text as parts. Once page reads completed automatically it turns to next page and play. this speech should be in Norwegian Language.
I have gone through EPUB Viewer for Android with Text to Speech[^] this link and imported this project and built tested on my device i found it is text to speech feature is there in app but i can not able to modify as Norwegian support speech can any one give me a solution
|
|
|
|
|
please follow javapapers and androidexamples sites for getting ready examples for you
|
|
|
|
|
Any one can sugges me how to use MCC, MNC, LAC, CID current location find in android app.
|
|
|
|
|
|
where can l get the material and some sites to visit need to start developing android applications
|
|
|
|
|
Google for "Android developer" and it will show you the right place.
|
|
|
|
|
for notes use
www.java2s.com
www.roseindia.com
www.tutorialspoint.com
|
|
|
|
|
Iam having android code bellow:
after send request to asp page than receiving respond content.
I have a problem : asp page not open and in page load function I get data from request . but it is null.
Somebody help me. get data from asp page
Android code
public String SendDataWebForm()
{
String line = "", rs = "";
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://tracklocation.somee.com/maps.aspx?id=12321");
try {
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("imei","123456789"));
post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = client.execute(post);
rs = response.toString();
} catch (IOException e) {
e.printStackTrace();
}
return rs;
}
ASP code
namespace WebLocationPredicttion
{
public partial class maps : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string text = Page.Request.Form["imei"];
}
}
}
|
|
|
|
|
Hi,
I have facing a problem that after updating the ADT in my eclipse i found an default project every time i created a new android application project named as the appcompat_v7 but working with this is difficult for me.I dont want this Support library i just want to develop an simple application only using the appcompat_v4 how to stop creating the default project named as the appcompat_v7.
Please help me regarding this issue...
|
|
|
|
|