Android Tutorial Material Design 1 - Basics

chrjak

Active Member
Licensed User
Longtime User
Hey corwin. You have great tutorials. Could you add some for animations in material?
 

corwin42

Expert
Licensed User
Longtime User
Hey corwin. You have great tutorials. Could you add some for animations in material?
Currently not planned. Maybe later.
 

chrjak

Active Member
Licensed User
Longtime User

Ramezanpour2

Member
Licensed User
Longtime User
hi dear im get an error please help and answer me


B4A version 4.30
Parsing code. 0.03
Compiling code. 0.11
Compiling layouts code. 0.02
Generating R file. Error
..\resources\values-v21\themes.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DarkActionBar'.
..\resources\values-v21\themes.xml:6: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
..\resources\values-v21\themes.xml:4: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
..\resources\values-v21\themes.xml:5: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Do you have Android SDK platform-tools 21 installed? Run the Android SDK manager and make sure that the checkbox is ticked.
 

Ramezanpour2

Member
Licensed User
Longtime User
@RandomCoder

this is my manifest





'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="21"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'Set custom theme
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Have you updated your path to point to the new SDK...

Important:
Because we use features of the SDK version 21 you have to configure the correct android.jar in the Configure Paths dialog of the IDE. Set the path for android.jar to <Your_Android_SDK_HOME>\platforms\android-21\android.jar
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
@RandomCoder

im cant set sdk 21 becouse im not found it on my pc
Now we have found the problem!

As you have already shown that SDK 21 platform-tools is installed in the Android SDK Manager, then it is just a case of locating where it has stored the Android.jar file. If your having trouble locating it then just use Windows search to locate it for you, there will be several depending on which SDK's you have previously installed. You want the one that is in the android-21 folder.
 

hzchrisfang

Member
Licensed User
Longtime User
Hi @corwin42
I have a problem.
I try this example in my device, but display black actionbar and white panel just same as the left picture in the #1. But I try the example project in Material Design 2, Material Design 3 and Material Design 4, it works fine. So where the problem is?
 

thedesolatesoul

Expert
Licensed User
Longtime User
You didnt add the theme in the manifest editor.
 

hzchrisfang

Member
Licensed User
Longtime User
As you are running it on a pre-lollipop device, this is expected.

OK, the problem is my device version. I read this:


Thank you for your patience @thedesolatesoul
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…