I'm translating QQ Desktop Pro from Chinese to English using the UziTech Android Translator. I have successfully translated the strings.xml, but when it's reinstalled onto the device it force closes with this error:
ActivityThread | E: android.view.InflateException: You must specify a valid layout reference. The layout ID @layout/app_vertical_list is not valid.
(From CatLog)
The app_vertical_list.xml mentioned looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.tencent.launcher.VerticalAppLayout android:id="@id/all_apps_v" android:paddingLeft="0.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="70.0dip" android:layout_weight="1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.tencent.qqlauncher">
<com.tencent.launcher.AllAppsListView android:id="@id/applistview" android:background="#00000000" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="20.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="#00000000" android:cacheColorHint="#00000000" android:divider="@drawable/ic_list_dividing_line" />
<com.tencent.launcher.LetterListView android:id="@id/MyLetterListView01" android:background="#00000000" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentRight="true" launcher:textColor="#ffffffff" launcher:textSize="12.0sp" launcher:startPadding="10.0dip" launcher:endPadding="10.0dip" launcher:rightPadding="3.0dip" />
<TextView android:textSize="30.0sp" android:gravity="center" android:id="@id/TextView_CenterChar" android:background="@drawable/bg_hitchar" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" style="\@style/app_list_hitchar" />
<com.tencent.launcher.DrawerTextView android:id="@id/drag_cache_view" android:visibility="invisible" android:layout_width="72.0dip" android:layout_height="80.0dip" style="\@style/DrawerIcon.Portrait" />
</com.tencent.launcher.VerticalAppLayout>
(I've also attached the original XML in a zipped xml)
And the r.java decompiled from the classes.dex looks like this (screenshot):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I've also attached the zipped source files, as it's too big to post.
Any ideas on why it force closes? I have successfully translated the Tencent Desktop (MIUI / iPhone style launcher with no app drawer) but want to translate this one. I'll post the other one soon.
Bump
Sent from my GT540 using XDA App
Quinny899 said:
Bump
Sent from my GT540 using XDA App
Click to expand...
Click to collapse
Is it QQ launcher pro?
then do i guess you or someone just is done with it.
https://market.android.com/details?id=com.tencent.qqlauncher&feature=search_result ...
They've just updated it in English. Well, I guess PROJECT CLOSED
Sent from my GT540 using XDA App
Related
Hey guys!
I have searched and found some links regarding theme's colors:
Shell and System Colors
Colors of Title Bar and Soft Keys
Customizing System Colors
Change highlight color from green to gray
But I can't find which entry is responsible for the blue color you see in the attached picture.
All I want is to make it gray.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Any help is appreciated
Regards!
EDIT: Check post #4 for the answer.
PS:It is Dark Ninja's White Theme (with slightly edited topbar and taskbar).
It should be handled by your theme (TSK file) parameters, but I'm not sure which one. (just an idea)
I think it's gotta be in the .tsk. I would try these for starters:
Code:
[HKEY_CURRENT_USER\Software\Microsoft\Today\TabView]
"BackgroundColor"=dword:40000006
"EdgeBitmap"="\\windows\\Black_TabCurveEdgeH.png"
"EdgeBitmapLowerLeftColor"=dword:00B3C335
"EdgeBitmapUpperRightColor"=dword:00B560A6
"EdgeShadowBitmap"="\\windows\\Black_TabCurveEdgeHShadow.png"
"[COLOR="Red"]SelectedItemColor[/COLOR]"=dword:40000005
"UnselectedItemColor"=dword:4000000F
If it's not there, then it must be buried in here:
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Color]
I would install a tsk file, then export the two keys, then install another tsk file that changes the highlight color and see if you can figure out which value is changing (there will be other stuff changing, too, so it won't be easy).
I had the time to flash a new rom today and I found the entry responsible for the color I was looking for..
It was indeed somewhere inside the "HKLM\Software\Microsoft\Color" key.
I have marked with red color the relevant binary values in "ThemeValues" below:
Blue:
Code:
<characteristic type="HKLM\Software\Microsoft\Color">
<parm name="ThemeColors" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==" datatype="binary" />
<parm name="ThemeValues" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA[COLOR="Red"]ETOq[/COLOR]AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAA==" datatype="binary" />
</characteristic>
Gray:
Code:
<characteristic type="HKLM\Software\Microsoft\Color">
<parm name="ThemeColors" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==" datatype="binary" />
<parm name="ThemeValues" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA[COLOR="Red"]bGVs[/COLOR]AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAA==" datatype="binary" />
</characteristic>
And this is what I have now:
Thank you guys for your replies!
Regards!
Hello everyone, as we all here like Sony style I decided to get rid of AOSP Holo theme and bring up Sony's style in place of it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Requirements:
APK Tool. I recommend you to use VTS
Text editor like Notepad++
First decompile you framework-res.apk from /system/framework/
Go to /res/values/styles.xml
Find: <style name="Theme.Holo" parent="@style/Theme"> and replace it with: <style name="Theme.Holo2" parent="@style/Theme">
Find: <style name="Theme.Holo.Light" parent="@style/Theme.Light"> and replace it with: <style name="Theme.Holo2.Light" parent="@style/Theme.Light">
Find <style name="Theme.DeviceDefault" parent="@style/Theme.Holo"> and replace it with: <style name="Theme.DeviceDefault" parent="@style/Theme.Holo2">
Find <style name="Theme.DeviceDefault.Light" parent="@style/Theme.Holo.Light"> and replace it with: <style name="Theme.DeviceDefault.Light" parent="@style/Theme.Holo2.Light">
Add this to the end:
Code:
<style name="Theme.Holo" parent="@style/Theme.DeviceDefault" />
<style name="Theme.Holo.Light" parent="@style/Theme.DeviceDefault.Light" />
To be like this:
Recompile your framework-res.
Create flashable zip and flash it with recovery.
Reboot and enjoy.
Tell me if worked with you :good:
Click to expand...
Click to collapse
Thanks for the tutorial.
naheel azawy said:
Hello everyone, as we all here like Sony style I decided to get rid of AOSP Holo theme and bring up Sony's style in place of it.
Requirements:
APK Tool. I recommend you to use VTS
Text editor like Notepad++
Click to expand...
Click to collapse
nice
I am having great trouble getting images in my new application to align with one another. This is what my app should look like:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
but this is what it looks like on smaller screens:
I have made multiple layouts before for bigger and smaller screens but the problem I am having is the device I am testing on still fits the normal layout size but is smaller than the design screen default (nexus one)The black kite is set to always be in the centre and i have been trying to align the green to always stay around the black. (please note that the green is made up of 4 equal buttons). How can I get it so it will look like it should on all devices(ie all normal sized devices, I know scaled up versions must be made, like small, large xlarge).
I have been research the alignment to left of and right of but these don't give the result i am looking for. This is my xml code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:id="@+id/top_right_green"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="30dp"
android:layout_marginTop="66dp"
android:background="@drawable/v2" />
<Button
android:id="@+id/top_left_green"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button2"
android:layout_alignBottom="@+id/button2"
android:layout_toLeftOf="@+id/button2"
android:background="@drawable/v" />
<Button
android:id="@+id/lower_right_green"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_toRightOf="@+id/button3"
android:background="@drawable/v4" />
<Button
android:id="@+id/lower_left_green"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button4"
android:layout_alignBottom="@+id/button4"
android:layout_toLeftOf="@+id/button4"
android:background="@drawable/v3" />
<Button
android:id="@+id/centre_black_kite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@drawable/b"
android:gravity="center" />
</RelativeLayout>
feel this is a commonly asked question but I haven't found a solution that would fix my xml. What am I doing wrong?
In this tutorial we are going to learn how to add app shortcut to android app( like iphone’s 3d touch).
Into your app from scratch using android studio.
Requirements
-working Brain
-android studio /eclipse
-basic knowledge of android programming(not Required )
lets get started
Step -1
Add this in androidmanifest.xml
PHP:
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
After this
PHP:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
It should look like this after adding the code
PHP:
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
Now Create New XML file inside res/xml/ (if there is no folder names xml then create one )
Name the file as shortcuts.xml
and paste this inside
PHP:
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="myshortcut"
android:enabled="true"
android:icon="@drawable/shortcut"
android:shortcutShortLabel="@string/my_shortcut"
android:shortcutLongLabel="@string/ my_shortcut "
android:shortcutDisabledMessage="@string/ my_shortcut _disabled">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="YourPackageName" for example com.pankaj.rai
android:targetClass="YourActivityName"/> for example com.pankaj.rai.mainactivity
<categories android:name="android.shortcut.conversation"/>
</shortcut>
</shortcuts>
Add this value to res/value/strings.xml
PHP:
<string name="my_shortcut">Your shortcut name</string>
<string name="my_shortcut_disabled">shortcut is disabled</string>
Add icon in res/drawable
Name it shortcut
And it should look like this
PHP:
Shortcut.png
There you go guys now you have 3 shortcut in you app.
Result
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ps: 3D touch/app shortcut will only work in android 7.X.X or above
if you have any doubt about this tutorial please let me know
source:developer.android.com
Reserved
Reserved for future post
Android Studio 3.2
I've got a recycler view. The fields inside each item are ignoring constraints that were set.
1. I believe the internal cell of the recycler is not the width of the recycler.
2. Right and End constraints are apparently being ignored.
It looks to me like the Right/End constraints are ignored because the parent width of the internal ConstraintLayout is not the full width of the recycler.
I have the width set at 380 but had it at "match_parent".
I get the same result either way.
How can I get the spinner and the Date all the way over to the right side?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
adapter code
Code:
// Create new views (invoked by the layout manager)
@Override
public TestAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.stlse, null);
return new ViewHolder(view);
}
recyclerview xml
Code:
<android.support.v7.widget.RecyclerView
android:id="@+id/StatusListRecycler"
android:layout_width="380dp"
android:layout_height="410dp"
android:layout_marginTop="50dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txTitle" />
internal cell xml as set in myAdapter.ViewHolder onCreateViewHolder
Code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stlse"
android:tag="stlse_layout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/stlse_name"
android:text="Manager"
android:textSize="15dp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Spinner
android:id="@+id/stlse_status"
android:prompt="@string/dropdown_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginRight="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/stlse_date"
android:text="Date"
android:textSize="15dp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/stlse_name" />
</android.support.constraint.ConstraintLayout>