These are chat archives for Trinea/android-open-project

2nd
Aug 2016
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:26
need help anyone there?
Aldo Cano
@aldocano
Aug 02 2016 07:26
me
:smile:
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:27
@aldocano "Resource is not a Drawable (color or path)" what does this error mean?
Aldo Cano
@aldocano
Aug 02 2016 07:28
it means that your file that you are trying to use it isnt drawable
refer here
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:33
@aldocano can you see my code?
i havre used a png actually
the full stack trace is
android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020059 a=-1 r=0x7f020059}
Aldo Cano
@aldocano
Aug 02 2016 07:34
with png it should work
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:34
yes that is the problem :worried:
whenever a new activity is started it gives the error
Aldo Cano
@aldocano
Aug 02 2016 07:35
how do u set the drawable
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:36
@drawable/.....png
Aldo Cano
@aldocano
Aug 02 2016 07:37
show me some snippet
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:37
<ImageView
        android:layout_width="87dp"
        android:layout_height="70dp"
        android:id="@+id/imageView3"
        android:layout_alignBottom="@+id/button3"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:background="@drawable/days" />
@aldocano
Aldo Cano
@aldocano
Aug 02 2016 07:41
android:src="@drawable/days"
or from activity
ImageView img= (ImageView) findViewById(R.id.imageView3);
img.setImageResource(R.drawable.days);
@MohammadHasham
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:46
okay!
so i don't need an src ?
@aldocano
Aldo Cano
@aldocano
Aug 02 2016 07:50
u need an src to set an image to imageview
not background
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:51
<ImageView
        android:layout_width="80dp"
        android:layout_height="70dp"
        android:id="@+id/imageView"
        android:src="@drawable/hap"/>
is this okay?
@aldocano
Aldo Cano
@aldocano
Aug 02 2016 07:52
go and try it
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:56
still a bunch of errors @aldocano
:worried:
Aldo Cano
@aldocano
Aug 02 2016 07:57
what type of ?
see the log
Muhammad Hasham
@MohammadHasham
Aug 02 2016 07:59
is there a way i can send you my code?
xml and java files
Aldo Cano
@aldocano
Aug 02 2016 07:59
import it to github
Muhammad Hasham
@MohammadHasham
Aug 02 2016 08:00
what about pastebin?
Aldo Cano
@aldocano
Aug 02 2016 08:00
ok
Muhammad Hasham
@MohammadHasham
Aug 02 2016 08:05
please review that
Thanks
Aldo Cano
@aldocano
Aug 02 2016 08:09
what your log cat says
Muhammad Hasham
@MohammadHasham
Aug 02 2016 08:11
08-02 04:07:20.205 1315-1315/com.example.mohammadhasham.exceryou E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.example.mohammadhasham.exceryou.MainActivity.access$super
@aldocano