18 Ocak 2018 Perşembe

Build An Android Project Part2

Telephone and Tablet: Specifies the least Android working framework form your application will utilize when running on telephone and tablet.

Television: Specifies the most minimal form of the Android working framework your application will utilize when running on TV.

Wear: Specifies the most reduced variant of the Android working framework your application will utilize when on wearable gadgets.

In the wake of influencing the essential changes here, I to will go to the subsequent stage with the Next catch. At this stage, we will be gotten some information about the outline of the application. On the off chance that you have an application that objectives tablets, we prescribe you pick the Master/DetailFlow compose. Thusly the ordinary application is shown on the cell phone when a route menu is shown on the tablet gadgets on the left.

Everything is prepared after you name your principle action.

Movement Name: Name of the screen

Format Name: Name of the document containing the outline for the screen

Menu Resource Name: The name of the menu that your application will utilize.

Title: Specifies the title of the made screen. It is situated at the highest point of the screen.

In the wake of making another venture, we can see your task records on the left half of Android Studio (black box). In the center locale, a supervisor window for the chose record will be opened (red box). On the off chance that we get ready in this segment, we can take after support yield of utilizations from window named Event Log (green box).

Note: Outputs that will be shown to the client in Android applications that we will do in this segment, or contributions to be taken from the client, are transmitted through this window.

With the development of Android Studio, the Eclipse-based task structure we have officially utilized has experienced a few changes and is more straightforward. As you most likely are aware, when we make another Android venture, we see some new organizers and XML records instead of a standard Java venture. Presently we should inspect the structure of an Android Studio venture in detail:

fabricate envelope: Contains assemblage records as indicated by particular gathering factors. Situated in the principle application module.

libs envelope: If we are utilizing a Java library (eg AdMob) that isn't a piece of the Android SDK, we have to put the significant JAR records in this organizer. In the wake of including the JAR document, we ought not neglect to right tap on the record and select Add To Build Path. Generally the compiler does not see the jug document.

src organizer: The source documents are situated here. We will keep the Java records inside this organizer.

src/androidTest organizer: Contains instrumental test documentation.

src/primary/java organizer: Contains Java source code for application exercises.

src/primary/jni/organizer: Contains local code that uses the Java Native Interface (JNI).

src/primary/gen/organizer: Contains documentation made by Android Studio, for example, interface documentation created from R.Java or AIDL records.

src/primary/resources/organizer: Usually void. You can utilize it to have your crude documents. The documents you put here are incorporated into your .apk record.

src/fundamental/res envelope: Any assets identified with the application are kept in this organizer. The document composes put away here can be picture records, show plans, and content documents. Presently how about we look at this organizer in more detail:

drawable organizers: These envelopes contain the picture records utilized as a part of the application. These documents can be in PNG or JPEG design. The hdpi (high dpi), ldpi (low dpi), mdpi (medium dpi) and xhpi (additional hight dpi) alongside the envelope enable us to call the document as indicated by the gadget particular screen resolutions. For instance, if the gadget that the application is running on is more seasoned and the screen bolsters low determination, the picture documents in the ldpi organizer will be utilized. Yet, in the event that the application is taking a shot at a cutting edge widescreen gadget, the records in a high-determination organizer are utilized as needs be. On the off chance that you have a decent plan in your application and you are supporting an extensive variety of gadgets, we suggest that you request documents in the correct organization from your architect.

anim organizer: Contains XML documents that are aggregated for movement objects.

shading envelope: Contains XML records that characterize hues.

mipmap envelope: Includes the opening logos of your application.

format envelope: Here are the outline records for the screens. These records in xml arrange contain plans for each screen. At the point when a screen is made with Activity, the related design is brought in the onCreate technique and the things to be put on the screen are made.

crude envelope: Contains crude esteem records relying upon the demand. It is a helpful organizer for putting away media records, for example, MP3 and Ogg.

menu organizer: If you need a menu to show up when a gadget is pushed on a menu catch, we store the menu components in a xml record and store them in this envelope.

values ​​folder: The constants utilized as a part of the application can be put away here. The strings.xml document stores all the content utilized as a part of the application and showed to the client on the screens. These qualities ​​stored in the key - information rationale are brought in the code or in the design records. In the meantime, these qualities ​​are set apart in the R.java document. Generally colors.xml document will be utilized as a part of format records

values ​​folder: The constants utilized as a part of the application can be put away here. The strings.xml record stores all the content utilized as a part of the application and showed to the client on the screens. These qualities ​​stored in the key - information rationale are brought in the code or in the design documents. In the meantime, these qualities ​​are set apart in the R.java document. The colors.xml record, be that as it may, contains predefined hues to be utilized as a part of the format documents. The styles.xml document contains the styles utilized on screens and called from Yinelayout records. Another normal for the qualities ​​folder is that the gadget can be restricted to the set local dialect. We will clarify this in the accompanying segments.

xml organizer: Stores adaptable XML documents that characterize esteems ​​such as aPreferenceScreen, AppWidgetProviderInfo, or Searchability Metadata.

.gitignore document: Defines unregistered records that are dismissed by git.

The app.iml document: IntelliJ IDEA module.

build.gradle document: Includes modifiable properties for aggregation framework.

AndroidManifest.xml document: This record is the core of the application. Every one of the highlights identified with the application and every one of the consents that the application will ask for from the working framework are characterized here. In the meantime, every screen utilized as a part of the application must be recorded and characterized here. We will clarify these highlights later in the section.

On the off chance that you need to run a task you've just taken a shot at in Android Studio on another PC, or in the event that you need to take a shot at case ventures we have imparted to you amid Android 201, 301, and 401 preparing, you should move the undertaking records to the Android Studio workspace.

When you open Android Studio, you will see a screen like the one beneath. To open undertakings made in various situations, select Import venture (Eclipse ADT, Gradle, and so on.):

From the following screen, select the index on your PC where your undertaking is found:

Android Studio will need to re-enlist your current undertaking record by changing over it to another task document. This will ask you where you need the new record to be saved money on your PC:

In the subsequent stage, Android Studio introduces the Gradle similarity of the .bump documents that are in your undertaking or the libraries you included all things considered. On the off chance that you can not choose which variant to introduce while doing these downloads, introduce the most recent renditions. On the off chance that you require an alternate form of the most recent adaptation, you ought not stamp the containers beneath, at that point import these libraries physically.

After this procedure, the descendants is prepared for utilize:

Hiç yorum yok:

Yorum Gönder