简体   繁体   中英

Android Studio: Add an activity to mobile (Material design)

I have a question about theme for Android app in Android Studio. When I'm creating a new project I would like to have an material design theme, but I don't get this activity theme to choose.

On first picture you can see my view for adding an activity and on second picture what I would like to have.

My current view

我目前的主题

Material design view

材料设计主题

Does anyone have a solution how to set up Android Studio so I can have a view which is showed on second picture?

I don' t know if my as show that in the wizard. Bit materiale is a style. And this style is a guide line recommend by google. So you can make your app with material design also writing the code. For example you can use a floating action button, or a combo of beautiful color or pit simple animations inside yours views or using cards in listview.

If you have latest updated Android API, SDK , then you will get the material design by default; even if you would not use wizard for adding an activity.

Not sure if I'm barking up the wrong tree here, but just for reference, here are the Android SDK components I've got installed:

在此处输入图片说明

Here is the buildscript, android and dependency sections of my build.gradle:

在此处输入图片说明 在此处输入图片说明 在此处输入图片说明

And last but not least, Android Studio version:

在此处输入图片说明

If you couldn't find the tool fix, you can anyway inherit your activity from appcompactactivity. 
And change your androidmanifest as follows to get material design feel
 <application
       //your stuff
        android:theme="@style/Theme.AppCompat.Light.NoActionBar" 

Don't forget to add the following depenency in build.gradle and sync

compile 'com.android.support:appcompat-v7:22.0.0'

I found the answer to this question.

To have this Project Template (Material design) available in Project Wizard, you need to have Android Studio version 1.4 or above.

For details see this link: Android Studio 1.4 Release

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM