1syntax = "proto3"; 2 3package tools.android.ak.res.proto; 4 5import "src/tools/ak/res/proto/res_meta.proto"; 6 7// A Resource file including its values. 8// Next ID: 4 9// From frameworks/base/tools/aapt2/Resource.h, 10message Resource { 11 // Next ID: 26 12 enum Type { 13 ANIM = 0; 14 ANIMATOR = 1; 15 ARRAY = 2; 16 ATTR = 3; 17 ATTR_PRIVATE = 4; 18 BOOL = 5; 19 COLOR = 6; 20 CONFIG_VARYING = 7; 21 DIMEN = 8; 22 DRAWABLE = 9; 23 FONT = 10; 24 FRACTION = 11; 25 ID = 12; 26 INTEGER = 13; 27 INTERPOLATOR = 14; 28 LAYOUT = 15; 29 MENU = 16; 30 MIPMAP = 17; 31 NAVIGATION = 18; 32 PLURALS = 19; 33 RAW = 20; 34 STRING = 21; 35 STYLE = 22; 36 STYLEABLE = 23; 37 TRANSITION = 24; 38 XML = 25; 39 } 40 41 // name of the resource, e.g.: 42 // for strings its the "name" attribute of the <string> entry 43 // for layouts its the layout file name. 44 string name = 1; 45 Type resource_type = 2; 46 StyleableMetaData styleable_value = 3; // set if resource_type = STYLEABLE 47} 48 49// Ideally we could just use a recordio file for this. But not opensource. 50message Resources { 51 string pkg = 1; 52 repeated Resource resource = 2; 53} 54