source not found

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

source not found

Postby The_One_Neo » Thu Jan 15, 2009 8:56 am

I create a new blankview extends view , i want load it from my
layout.xml

but when i debug it , error it said "source not found".
if i don't debug it , it same.


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
xmlns:app="http://schemas.android.com/apk/res/
com.example.android.apis"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">


<android.software.canvas.BlankView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
/>
</LinearLayout>


package android.software.canvas;


import android.content.Intent;
import android.os.Bundle;
import android.software.canvas.PaletteActivity.ImageAdapter;
import android.software.control.GalleryList;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.Gallery;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Gallery.LayoutParams;


public class BlankActivity extends BaseActivity {
BlankView blankview;


public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);


requestWindowFeature(Window.FEATURE_NO_TITLE);//debug point


blankview = (BlankView)findViewById(R.id.blank);
}


how to fix it ?? thanks
The_One_Neo
Developer
Developer
 
Posts: 28
Joined: Wed May 07, 2008 9:34 am

Top

Postby MrSnowflake » Thu Jan 15, 2009 2:38 pm

in the xml you should specify your view with its fully qualified packagename. I guess android.software.canvas.BlankView is you View's name, but that's a horrible name! __NEVER EVER__ use android as the beginning of you package name, as that's not your domain. Use something like com.The_One_Neo.views.BlankView or something like that. I think that's your problem.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby The_One_Neo » Fri Jan 16, 2009 3:37 am

i follow the mind modified my pageback name to "package the_one_neo.software.canvas;"


<the_one_neo.software.canvas.BlankView android:id="@+id/blank"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
/>

but the problem same with before?

how to fix it?
The_One_Neo
Developer
Developer
 
Posts: 28
Joined: Wed May 07, 2008 9:34 am

Postby MrSnowflake » Fri Jan 16, 2009 10:22 am

You reference to BlankView, but you only show us BlankActivity. Are you sure you do have a BlankView view?
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests