mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-29 18:59:14 +08:00
moeidy cmake/options ..,add edit_text assets
This commit is contained in:
parent
3430daf582
commit
86c1c7478b
@ -31,3 +31,6 @@ function(Translate pofile transtopath)
|
||||
COMMENT "Translate strings resource...${PROJECT_BINARY_DIR}"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF)
|
||||
option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF)
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
option(MINIMAL_SIZE_OPTIMIZED "For IOT/Embedded size optimize" ON)
|
||||
option(MINIMAL_SIZE_OPTIMIZED "For IOT/Embedded size optimize" OFF)
|
||||
option(BUILD_DOCS "Build documents" OFF)
|
||||
option(BUILD_EXAMPLES "Build examples" OFF)
|
||||
option(BUILD_TESTS "Build unit tests" OFF)
|
||||
option(BUILD_CDROID_TESTS "Build unit tests" ON)
|
||||
|
||||
option(ENABLE_GIF "enable gif encode and decoder" OFF)
|
||||
option(ENABLE_CAIROSVG "enable svg decoder" OFF)
|
||||
|
3
src/3rdparty/cairo-1.16.0/src/CMakeLists.txt
vendored
3
src/3rdparty/cairo-1.16.0/src/CMakeLists.txt
vendored
@ -655,3 +655,6 @@ install(TARGETS cairo_static RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIB
|
||||
install(FILES ${enabled_cairo_headers} DESTINATION include/cairo)
|
||||
install(FILES ../cairo-version.h DESTINATION include/cairo)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/cairo-features.h DESTINATION include/cairo)
|
||||
|
||||
file(COPY ../cairo-version.h ${enabled_cairo_headers} ${PROJECT_BINARY_DIR}/cairo-features.h
|
||||
DESTINATION ${CMAKE_BINARY_DIR}/include/cairo)
|
||||
|
@ -295,7 +295,6 @@ Drawable* Assets::getDrawable(const std::string&fullresid){
|
||||
if(TextUtils::startWith(resname,"attr")){//for reference resource
|
||||
resname = mTheme.getString(resname.substr(5));
|
||||
d=getDrawable(resname);
|
||||
LOG(DEBUG)<<fullresid<<"="<<resname<<" d="<<d;
|
||||
}else if(TextUtils::endWith(resname,".9.png")){
|
||||
d=new NinePatchDrawable(this,fullresid);
|
||||
}else if (TextUtils::endWith(resname,".png")||TextUtils::endWith(resname,".jpg")){
|
||||
|
@ -202,7 +202,7 @@ InputMethodManager&InputMethodManager::getInstance(){
|
||||
mInst->setKeyCharacterMap("qwerty.kcm");
|
||||
}
|
||||
if(imemethods.size()==0){
|
||||
InputMethod*m=new InputMethod("cdroid:xml/qwerty.xml");
|
||||
InputMethod*m=new InputMethod("cdroid:values/qwerty.xml");
|
||||
m->load_dicts("dict_pinyin.dat","userdict.dat");
|
||||
registeMethod("ChinesePinyin26",m);
|
||||
}
|
||||
|
21
src/gui/res/drawable/edit_text_holo_dark.xml
Executable file
21
src/gui/res/drawable/edit_text_holo_dark.xml
Executable file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:cdroid="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item cdroid:state_multiline="true" cdroid:state_window_focused="false" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_default_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_window_focused="false" cdroid:state_enabled="false" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_activated_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:state_activated="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_focused_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_default_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_focused_holo_dark" />
|
||||
<item cdroid:state_multiline="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_holo_dark" />
|
||||
|
||||
<item cdroid:state_window_focused="false" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_default_holo_dark" />
|
||||
<item cdroid:state_window_focused="false" cdroid:state_enabled="false" cdroid:drawable="@cdroid:mipmap/textfield_disabled_holo_dark" />
|
||||
<item cdroid:state_enabled="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_activated_holo_dark" />
|
||||
<item cdroid:state_enabled="true" cdroid:state_activated="true" cdroid:drawable="@cdroid:mipmap/textfield_focused_holo_dark" />
|
||||
<item cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_default_holo_dark" />
|
||||
<item cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_disabled_focused_holo_dark" />
|
||||
<item cdroid:drawable="@cdroid:mipmap/textfield_disabled_holo_dark" />
|
||||
</selector>
|
||||
|
21
src/gui/res/drawable/edit_text_holo_light.xml
Executable file
21
src/gui/res/drawable/edit_text_holo_light.xml
Executable file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:cdroid="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item cdroid:state_multiline="true" cdroid:state_window_focused="false" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_default_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_window_focused="false" cdroid:state_enabled="false" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_activated_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:state_activated="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_focused_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_default_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_focused_holo_light" />
|
||||
<item cdroid:state_multiline="true" cdroid:drawable="@cdroid:mipmap/textfield_multiline_disabled_holo_light" />
|
||||
|
||||
<item cdroid:state_window_focused="false" cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_default_holo_light" />
|
||||
<item cdroid:state_window_focused="false" cdroid:state_enabled="false" cdroid:drawable="@cdroid:mipmap/textfield_disabled_holo_light" />
|
||||
<item cdroid:state_enabled="true" cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_activated_holo_light" />
|
||||
<item cdroid:state_enabled="true" cdroid:state_activated="true" cdroid:drawable="@cdroid:mipmap/textfield_focused_holo_light" />
|
||||
<item cdroid:state_enabled="true" cdroid:drawable="@cdroid:mipmap/textfield_default_holo_light" />
|
||||
<item cdroid:state_focused="true" cdroid:drawable="@cdroid:mipmap/textfield_disabled_focused_holo_light" />
|
||||
<item cdroid:drawable="@cdroid:mipmap/textfield_disabled_holo_light" />
|
||||
</selector>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<Keyboard xmlns:cdroid="http://schemas.android.com/apk/res/android"
|
||||
keyWidth="10%p"
|
||||
horizontalGap="2%p"
|
||||
verticalGap="5%p"
|
||||
horizontalGap="0.5%"
|
||||
verticalGap="1%"
|
||||
keyHeight="20%p"
|
||||
>
|
||||
<Row>
|
||||
|
@ -255,9 +255,9 @@
|
||||
<item name="focusable">true</item>
|
||||
<item name="focusableInTouchMode">true</item>
|
||||
<item name="clickable">true</item>
|
||||
<item name="background">?attr/editTextBackground</item>
|
||||
<item name="textAppearance">?attr/textAppearanceMediumInverse</item>
|
||||
<item name="textColor">?attr/editTextColor</item>
|
||||
<item name="background">?cdroid:attr/editTextBackground</item>
|
||||
<item name="textAppearance">?cdroid:attr/textAppearanceMediumInverse</item>
|
||||
<item name="textColor">?cdroid:attr/editTextColor</item>
|
||||
<item name="gravity">center_vertical</item>
|
||||
<item name="breakStrategy">simple</item>
|
||||
<item name="hyphenationFrequency">normal</item>
|
||||
@ -266,9 +266,9 @@
|
||||
|
||||
<style name="Widget.ExpandableListView" parent="Widget.ListView">
|
||||
<item name="groupIndicator">@drawable/expander_group</item>
|
||||
<item name="indicatorLeft">?attr/expandableListPreferredItemIndicatorLeft</item>
|
||||
<item name="indicatorRight">?attr/expandableListPreferredItemIndicatorRight</item>
|
||||
<item name="childDivider">@drawable/divider_horizontal_dark_opaque</item>
|
||||
<item name="indicatorLeft">?cdroid:attr/expandableListPreferredItemIndicatorLeft</item>
|
||||
<item name="indicatorRight">?cdroid:attr/expandableListPreferredItemIndicatorRight</item>
|
||||
<item name="childDivider">@cdroid:drawable/divider_horizontal_dark_opaque</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.ExpandableListView.White">
|
||||
|
@ -122,8 +122,8 @@ please see themes_device_defaults.xml.
|
||||
|
||||
<item name="textAppearanceButton">@style/TextAppearance.Holo.Widget.Button</item>
|
||||
|
||||
<item name="editTextColor">?attr/textColorPrimary</item>
|
||||
<item name="editTextBackground">@drawable/edit_text_holo_dark</item>
|
||||
<item name="editTextColor">?cdroid:attr/textColorPrimary</item>
|
||||
<item name="editTextBackground">@cdroid:drawable/edit_text_holo_dark</item>
|
||||
|
||||
<item name="candidatesTextStyleSpans">@string/candidates_style</item>
|
||||
|
||||
@ -465,7 +465,7 @@ please see themes_device_defaults.xml.
|
||||
<item name="textAppearanceButton">@style/TextAppearance.Holo.Light.Widget.Button</item>
|
||||
|
||||
<item name="editTextColor">?attr/textColorPrimary</item>
|
||||
<item name="editTextBackground">@drawable/edit_text_holo_light</item>
|
||||
<item name="editTextBackground">@cdroid:drawable/edit_text_holo_light</item>
|
||||
<item name="textEditSuggestionItemLayout">@layout/text_edit_suggestion_item</item>
|
||||
<item name="textEditSuggestionContainerLayout">@layout/text_edit_suggestion_container</item>
|
||||
<item name="textEditSuggestionHighlightStyle">@style/TextAppearance.Holo.SuggestionHighlight</item>
|
||||
|
@ -98,6 +98,7 @@ void ViewGroup::initGroup(){
|
||||
mGroupFlags|= FLAG_CLIP_TO_PADDING;
|
||||
mGroupFlags|= FLAG_ANIMATION_DONE;
|
||||
mGroupFlags|= FLAG_ANIMATION_CACHE;
|
||||
mGroupFlags|= FOCUS_BEFORE_DESCENDANTS;
|
||||
mGroupFlags!= FLAG_ALWAYS_DRAWN_WITH_CACHE;
|
||||
mLayoutMode = LAYOUT_MODE_UNDEFINED;
|
||||
mFocused = nullptr;
|
||||
@ -132,7 +133,14 @@ void ViewGroup::initFromAttributes(Context*ctx,const AttributeSet&atts){
|
||||
//setAnimationCacheEnabled
|
||||
std::string resid=atts.getString("layoutAnimation");
|
||||
setLayoutAnimation(AnimationUtils::loadLayoutAnimation(ctx,resid));
|
||||
setDescendantFocusability(0);
|
||||
|
||||
const int flags=atts.getInt("descendantFocusability",std::map<const std::string,int>{
|
||||
{"beforeDescendants",FOCUS_BEFORE_DESCENDANTS},
|
||||
{"afterDescendants",FOCUS_AFTER_DESCENDANTS},
|
||||
{"blocksDescendants",FOCUS_BLOCK_DESCENDANTS}
|
||||
},FOCUS_BEFORE_DESCENDANTS);
|
||||
setDescendantFocusability(flags);
|
||||
|
||||
setMotionEventSplittingEnabled(atts.getBoolean("splitMotionEvents"));
|
||||
if(atts.getBoolean("animateLayoutChanges",false))
|
||||
setLayoutTransition(new LayoutTransition());
|
||||
@ -2451,7 +2459,7 @@ bool ViewGroup::requestLayoutDuringLayout(View* view){
|
||||
}
|
||||
|
||||
bool ViewGroup::requestFocus(int direction,Rect*previouslyFocusedRect){
|
||||
int descendantFocusability = getDescendantFocusability();
|
||||
const int descendantFocusability = getDescendantFocusability();
|
||||
|
||||
bool result,took;
|
||||
switch (descendantFocusability) {
|
||||
|
7
tests/CMakeLists.txt
Normal file → Executable file
7
tests/CMakeLists.txt
Normal file → Executable file
@ -1,6 +1,5 @@
|
||||
if (BUILD_CDROID_TESTS)
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(porting)
|
||||
if (ENABLE_DTV)
|
||||
add_subdirectory(epg)
|
||||
add_subdirectory(tv)
|
||||
endif(ENABLE_DTV)
|
||||
|
||||
endif(BUILD_CDROID_TESTS)
|
||||
|
Loading…
Reference in New Issue
Block a user