Hello XDA users! I'm trying to develop an Android Launcher. First I want to "call" all apps in a Grid View. All works great, but appears a List View and I want a Grid. This is my code, where is the problem?
MainActivity.java
Code:
public class MainActivity extends Activity {
private GridView mGrid;
[user=439709]@override[/user]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set layout for the main screen
setContentView(R.layout.layout_main);
// load list application
mGrid = (GridView)findViewById(R.id.lvApps);
// create new adapter
AppInfoAdapter adapter = new AppInfoAdapter(this, Utilities.getInstalledApplication(this), getPackageManager());
// set adapter to list view
mGrid.setAdapter(adapter);
// implement event when an item on list view is selected
mGrid.setOnItemClickListener(new OnItemClickListener() {
[user=439709]@override[/user]
public void onItemClick(AdapterView parent, View view, int pos, long id) {
// get the list adapter
AppInfoAdapter appInfoAdapter = (AppInfoAdapter)parent.getAdapter();
// get selected item on the list
ApplicationInfo appInfo = (ApplicationInfo)appInfoAdapter.getItem(pos);
// launch the selected application
Utilities.launchApp(parent.getContext(), getPackageManager(), appInfo.packageName);
}
});
}
}
AppInfo.java
Code:
public class AppInfoAdapter extends BaseAdapter {
private Context mContext;
private List mListAppInfo;
private PackageManager mPackManager;
public AppInfoAdapter(Context c, List list, PackageManager pm) {
mContext = c;
mListAppInfo = list;
mPackManager = pm;
}
[user=439709]@override[/user]
public int getCount() {
return mListAppInfo.size();
}
[user=439709]@override[/user]
public Object getItem(int position) {
return mListAppInfo.get(position);
}
[user=439709]@override[/user]
public long getItemId(int position) {
return position;
}
[user=439709]@override[/user]
public View getView(int position, View convertView, ViewGroup parent) {
// get the selected entry
ApplicationInfo entry = (ApplicationInfo) mListAppInfo.get(position);
// reference to convertView
View v = convertView;
// inflate new layout if null
if(v == null) {
LayoutInflater inflater = LayoutInflater.from(mContext);
v = inflater.inflate(R.layout.layout_appinfo, null);
}
// load controls from layout resources
ImageView ivAppIcon = (ImageView)v.findViewById(R.id.ivIcon);
TextView tvAppName = (TextView)v.findViewById(R.id.tvName);
// set data to display
ivAppIcon.setImageDrawable(entry.loadIcon(mPackManager));
tvAppName.setText(entry.loadLabel(mPackManager));
// return view
return v;
}
}
Utilities.java
Code:
public class Utilities {
/*
* Get all installed application on mobile and return a list
* [user=955119]@param[/user]cContext of application
* [user=2056652]@return[/user]list of installed applications
*/
public static List<ApplicationInfo> getAllInstalledApplications(Context context) {
List<ApplicationInfo> installedApps = context.getPackageManager().getInstalledApplications(PackageManager.PERMISSION_GRANTED);
List<ApplicationInfo> launchableInstalledApps = new ArrayList<ApplicationInfo>();
for(int i =0; i<installedApps.size(); i++){
if(context.getPackageManager().getLaunchIntentForPackage(installedApps.get(i).packageName) != null){
//If you're here, then this is a launch-able app
launchableInstalledApps.add(installedApps.get(i));
}
}
return launchableInstalledApps;
}
/*
* Launch an application
* [user=955119]@param[/user]cContext of application
* [user=955119]@param[/user]pmthe related package manager of the context
* [user=955119]@param[/user]pkgNameName of the package to run
*/
public static boolean launchApp(Context c, PackageManager pm, String pkgName) {
// query the intent for lauching
Intent intent = pm.getLaunchIntentForPackage(pkgName);
// if intent is available
if(intent != null) {
try {
// launch application
c.startActivity(intent);
// if succeed
return true;
// if fail
} catch(ActivityNotFoundException ex) {
// quick message notification
Toast toast = Toast.makeText(c, "Application Not Found", Toast.LENGTH_LONG);
// display message
toast.show();
}
}
// by default, fail to launch
return false;
}
}
Sorry if I put so much code but I don't know where is the problem.
Enviado desde mi GT-S5570I usando Tapatalk 2
You didn't post the layout files.
Dark3n said:
You didn't post the layout files.
Click to expand...
Click to collapse
Thank's for the info! I edited this now
Enviado desde mi GT-S5570I usando Tapatalk 2
Please! Help!
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
Please! Help!
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
By layout files he ment .xml
File
Sent from my GT-S5302 using Tapatalk 2
sak-venom1997 said:
By layout files he ment .xml
File
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Dark3n said:
You didn't post the layout files.
Click to expand...
Click to collapse
Enviado desde mi GT-S5570I usando Tapatalk 2
I'm confused!
I fixed this error with android:numColumns="4" But I have other two errors, the first is that the name of the app is in the right and I want it down, and the other error is that the App images are not ajusted at her size.
Sorry for my english errors (a lot of errors), today I'm really stupid!! But... do you understad what I mean?
DannyGM16 said:
Enviado desde mi GT-S5570I usando Tapatalk 2
I'm confused!
I fixed this error with android:numColumns="4" But I have other two errors, the first is that the name of the app is in the right and I want it down, and the other error is that the App images are not ajusted at her size.
Sorry for my english errors (a lot of errors), today I'm really stupid!! But... do you understad what I mean?
Click to expand...
Click to collapse
I am sorry, but we cannot help you without this file:
Code:
/res/layout/layout_appinfo.xml
layout_appinfo.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="(xmlns deleted)"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42px"
android:layout_height="42px"
android:layout_marginRight="5dip"
android:scaleType="center"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center_vertical"
/>
</LinearLayout>
</LinearLayout>
layout_main.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="(xmlns deleted)"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/ExampleButton"
android:text="Example Button"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@+id/all_apps"
android:background="@android:color/black"
android:persistentDrawingCache="animation|scrolling"
android:alwaysDrawnWithCache="true"
android:scrollbars="none"
android:drawSelectorOnTop="false"
android:numColumns="4"
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
</LinearLayout>
Thank's for your help, I'm very hope to find you! And Now I fix the java archives, now you can try my project in an emulator.
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
layout_appinfo.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="(xmlns deleted)"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42px"
android:layout_height="42px"
android:layout_marginRight="5dip"
android:scaleType="center"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center_vertical"
/>
</LinearLayout>
</LinearLayout>
layout_main.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="(xmlns deleted)"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/ExampleButton"
android:text="Example Button"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@+id/all_apps"
android:background="@android:color/black"
android:persistentDrawingCache="animation|scrolling"
android:alwaysDrawnWithCache="true"
android:scrollbars="none"
android:drawSelectorOnTop="false"
android:numColumns="4"
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
</LinearLayout>
Thank's for your help, I'm very hope to find you! And Now I fix the java archives, now you can try my project in an emulator.
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
Do this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="(xmlns deleted)"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42px"
android:layout_height="42px"
android:layout_marginRight="5dip"
android:scaleType="center"
android:alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/ivIcon"
/>
</RelativeLayout>
(I hope that it works. I did not test it.)
nikwen said:
Do this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="(xmlns deleted)"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42px"
android:layout_height="42px"
android:layout_marginRight="5dip"
android:scaleType="center"
android:alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/ivIcon"
/>
</RelativeLayout>
(I hope that it works. I did not test it.)
Click to expand...
Click to collapse
You can watch the screenshoot:
1: Thank's for your help, the text is where I want.
2: New problem, the application images are too large, I knoelw that this problem is fixeable writing text in one of the java archives.
3: The text is ajusted, but not at all, watch it.
4: Thank's other time for your time and your help!
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
You can watch the screenshoot:
1: Thank's for your help, the text is where I want.
2: New problem, the application images are too large, I knoelw that this problem is fixeable writing text in one of the java archives.
3: The text is ajusted, but not at all, watch it.
4: Thank's other time for your time and your help!
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="(xmlns deleted)"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginRight="5dip"
android:scaleType="center"
android:alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/ivIcon"
android:gravity="center"
android:maxLines="1"
/>
</RelativeLayout>
Always set size values in dp. (You might need to change the numbers though.)
That is better for supporting different screen sizes.
Welcome.
nikwen said:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="(xmlns deleted)"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
>
<ImageView
android:id="@+id/ivIcon"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginRight="5dip"
android:scaleType="center"
android:alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/tvName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/ivIcon"
android:gravity="center"
android:maxLines="1"
/>
</RelativeLayout>
Always set size values in dp. (You might need to change the numbers though.)
That is better for supporting different screen sizes.
Welcome.
Click to expand...
Click to collapse
Oh! I didn't know it.
But the problem persist, the application icon must be resized.
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
Oh! I didn't know it.
But the problem persist, the application icon must be resized.
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
Yeah, do that.
You can use another scaleType for the ImageView. Use Google ("imageview scaletype"). Choose the right one.
nikwen said:
Yeah, do that.
You can use another scaleType for the ImageView. Use Google ("imageview scaletype"). Choose the right one.
Click to expand...
Click to collapse
... I don't understand you, please, show me an example
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
... I don't understand you, please, show me an example
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
For the ImageView change this
Code:
android:scaleType="center"
to
Code:
android:scaleType="centerInside"
Then change the layout_height and layout_width to the size you want.
nikwen said:
For the ImageView change this
Code:
android:scaleType="center"
to
Code:
android:scaleType="centerInside"
Then change the layout_height and layout_width to the size you want.
Click to expand...
Click to collapse
THANKS THANKS AND THANKS!! YOU ARE THE ****ING BOSS!!! YOU ARE MY GOD!! without your help I don't do it never!
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
THANKS THANKS AND THANKS!! YOU ARE THE ****ING BOSS!!! YOU ARE MY GOD!! without your help I don't do it never!
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
Welcome.
nikwen said:
Welcome.
Click to expand...
Click to collapse
And One Think, it's easy. I put a TabHost but I don't know how to put it higher?
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
And One Think, it's easy. I put a TabHost but I don't know how to put the text higher? Which android:xxxxxx I need to put in the text?
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
Enviado desde mi GT-S5570I usando Tapatalk 2
DannyGM16 said:
And One Think, it's easy. I put a TabHost but I don't know how to put it higher?
Enviado desde mi GT-S5570I usando Tapatalk 2
Click to expand...
Click to collapse
What do you mean with higher?
Related
okay I need help....
I'm a beginner to Android and Java (both of them and I am learning....)
So I thought of making a simple app but its got an annoying problem...
Its a calculator so it has some number keys ...the problem is that different keys give out different numbers like 2 prints out 9
MainActivity
Code:
package com.aN.calculator1;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity implements OnClickListener {
Button mb1, mb2, mb3, mb4, mb5, mb6, mb7, mb8, mb9, mb10, mb11, mb12, mb13, mb14, mb15, mb16 ;
TextView mTextView1 ;
[user=439709]@override[/user]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mTextView1 = (TextView)findViewById(R.id.textView1);
mb1 = (Button)findViewById(R.id.b1);
mb2 = (Button)findViewById(R.id.b2);
mb3 = (Button)findViewById(R.id.b3);
mb4 = (Button)findViewById(R.id.b4);
mb5 = (Button)findViewById(R.id.b5);
mb6 = (Button)findViewById(R.id.b6);
mb7 = (Button)findViewById(R.id.b7);
mb8 = (Button)findViewById(R.id.b8);
mb9 = (Button)findViewById(R.id.b9);
mb10 = (Button)findViewById(R.id.b10);
mb11 = (Button)findViewById(R.id.b11);
mb12 = (Button)findViewById(R.id.b12);
mb13 = (Button)findViewById(R.id.b13);
mb14 = (Button)findViewById(R.id.b14);
mb15 = (Button)findViewById(R.id.b15);
mb16 =(Button)findViewById(R.id.b16);
mb1.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
mTextView1.setText("");
}
});
mb2.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 != null || !mTextView1.getText().equals(""))
{
mTextView1.append("1");
}else {
mTextView1.setText("1");
}
}
});
mb3.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("2");
}
else {
mTextView1.setText("2");
}
}
});
mb4.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("3");
}
else {
mTextView1.setText("3");
}
}
});
mb5.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append( "4");
}
else {
mTextView1.setText("4");
}
}
});
mb6.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("5");
}
else {
mTextView1.setText("5");
}
}
});
mb7.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("6");
}
else {
mTextView1.setText("6");
}
}
});
mb8.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("7");
}
else {
mTextView1.setText("7");
}
}
});
mb9.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("8");
}
else {
mTextView1.setText("8");
}
}
});
mb10.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("9");
}
else {
mTextView1.setText("9");
}
}
});
mb12.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
if(mTextView1 !=null || !mTextView1.getText().equals(""))
{
mTextView1.append("0");
}
else {
mTextView1.setText("0");
}
}
});
}
[user=439709]@override[/user]
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
}
}
Activitymain.xml
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootRL"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="20dip"
android:layout_above="@+id/b1"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
<Button
android:id="@+id/b14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/b11"
android:text="/" />
<Button
android:id="@+id/b11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b14"
android:layout_alignParentLeft="true"
android:text="+" />
<Button
android:id="@+id/b16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/b13"
android:layout_alignParentRight="true"
android:layout_below="@+id/b11"
android:text="=" />
<Button
android:id="@+id/b13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/b11"
android:layout_alignBottom="@+id/b11"
android:layout_alignParentRight="true"
android:text="-" />
<Button
android:id="@+id/b12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b14"
android:layout_alignLeft="@+id/b15"
android:layout_alignRight="@+id/b15"
android:text="0" />
<Button
android:id="@+id/b4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b6"
android:layout_alignLeft="@+id/b7"
android:layout_alignParentRight="true"
android:text="3" />
<Button
android:id="@+id/b7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b9"
android:layout_alignLeft="@+id/b13"
android:layout_alignParentRight="true"
android:text="6" />
<Button
android:id="@+id/b8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b12"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/b11"
android:text="7" />
<Button
android:id="@+id/b10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b12"
android:layout_alignLeft="@+id/b13"
android:layout_alignParentRight="true"
android:text="9" />
<Button
android:id="@+id/b5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b8"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/b8"
android:text="4" />
<Button
android:id="@+id/b1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b3"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:text="Clear" />
<Button
android:id="@+id/b2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b5"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/b5"
android:text="1" />
<Button
android:id="@+id/b3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b6"
android:layout_centerHorizontal="true"
android:text="2" />
<Button
android:id="@+id/b15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/b9"
android:layout_alignParentBottom="true"
android:text="X" />
<Button
android:id="@+id/b9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/b3"
android:layout_alignRight="@+id/b3"
android:layout_below="@+id/b6"
android:text="8" />
<Button
android:id="@+id/b6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/b8"
android:layout_alignLeft="@+id/b3"
android:layout_alignRight="@+id/b3"
android:text="5" />
</RelativeLayout>
Thanks in Advance waiting for your help
I can't help you now as I'm on my way out.
But just a tip, try naming you buttons in such a way that you can recognize it easily.
For example, your Button b1 is Clear, b2 is "1", b3 is "2" so on and so forth, which is so confusing.
Try naming is as :bClear, bOne, bTwo, bExit, bMinus, bPlus and such.
If no one helps you out the moment I reach home, I'll be sure to help you out.
:highfive:
EDIT :
Also, you can remove
Code:
[user=439709]@override[/user]
public void onClick(View v) {
// TODO Auto-generated method stub
}
and
Code:
.. implement OnClickListener {
since you've set a OnClickListener on each button individually.
See my thread!
Edit:
Oops I am an "idiot" you already voted there!
[==)BULLET(==] said:
See my thread!
Edit:
Oops I am an "idiot" you already voted there!
Click to expand...
Click to collapse
sorry what ??
i didn't get you...
Sent from my GT-S5360 using xda app-developers app
anubhavrev said:
sorry what ??
i didn't get you...
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
You voted the poll on his thread that he's an idiot. :/
Anyway, I see no wrong with your code. The numbers are shown/typed according to what is pressed. Mind explaining the error a little more?
frenzyboi said:
You voted the poll on his thread that he's an idiot. :/
Anyway, I see no wrong with your code. The numbers are shown/typed according to what is pressed. Mind explaining the error a little more?
Click to expand...
Click to collapse
yea i jst realized bout voting idiot on his poll ....
@bullet
m sorry man ... chck pm ....
@frenzyboi
the problem is lyk i press 2 the textview shows 9 and most of d buttons are messed up similarly
.....
Edit:
P.S.- i have heard dat i'll hav to pay 25$ for uploading apps to gplay .... is it so ¿?
Sent from my GT-S5360 using xda app-developers app
Yes you need to pay $25 for uploading apps to gplay (even for free ones )!
[==)BULLET(==] said:
Yes you need to pay $25 for uploading apps to gplay (even for free ones )!
Click to expand...
Click to collapse
u read pm?
Sent from my GT-S5360 using xda app-developers app
anubhavrev said:
u read pm?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
you read yours!!
[==)BULLET(==] said:
you read yours!!
Click to expand...
Click to collapse
xda app doesn't hav notifications....
first thing to do aftr learning java - fix this app
Sent from my GT-S5360 using xda app-developers app
I'm having no error. Press 2 = 2, press 5 = 5.
Someone else please test the APK below and see if it happens to you too.
frenzyboi said:
I'm having no error. Press 2 = 2, press 5 = 5.
Someone else please test the APK below and see if it happens to you too.
Click to expand...
Click to collapse
Confirmed working.
Well done
Would try to include these buttons in my calculator!
frenzyboi said:
I'm having no error. Press 2 = 2, press 5 = 5.
Someone else please test the APK below and see if it happens to you too.
Click to expand...
Click to collapse
thanx man but could u tell how you fixed it ¿?
Sent from my GT-S5360 using xda app-developers app
anubhavrev said:
thanx man but could u tell how you fixed it ¿?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
I did not fix it! I'm using your code, with totally no error. LOL
Could you tell me which device u use?
Right now i will try it on another virtual device since my first virtual device and phone both have gingerbread
Mayb also try fixes from first reply...
Thanx a lot man for helping me....
anubhavrev said:
Could you tell me which device u use?
Right now i will try it on another virtual device since my first virtual device and phone both have gingerbread
Mayb also try fixes from first reply...
Thanx a lot man for helping me....
Click to expand...
Click to collapse
I'm using Xperia Ray on Android 4.2.2 P.A.C rom.
Android version shouldn't be a problem in this. The code is written correct [as far as I can see] and each button is registered to a correct number to display.
okay I finally found the fault....
i just removed the line declaring background png from the mainactivity.xml
and it worked
now could you tell me how to properly set a background ?
EDIT:is it fine if i set a Onclicklistener on each button individually ? or if there is a better way what wud it be ?
you sure it is the right way becoz removing that particular line stopped the errors...
@Ichigo yes
sorry i should have quoted ....
Ichigo said:
Did you actually put @drawable/bg? Replace bg with your background image.
Click to expand...
Click to collapse
its working ..i had earlier renamed the background to bg
this tym made some minor changes in the xml instead of being lazy
Sent from my GT-S5360 using xda app-developers app
Hello Guys .Hope You Are Fine..
I found this slidiable function in calculator app and integrated in my theme..
and now i want to share this mod with you ..
I will Guide You how to make it work in some apps like statusbar.dialer,etc
So Lets Start
PREPARATION..
+Knowledge of editing xmls
+Apktool or apkmanager
+My zip<in attachments
METHOD.
+Download attached zip.
+Decompile Your App In Which U want To use This Mod
+Extract Provided Zip in smali folder of your app.
+Now go to ids.xml and add this code above</resources>.
Code:
<item type="id" name="panelswitch">false</item>
+Now open ststus_bar_expande.xml
+If you want to add this mod in clock panel and brightness panel.
then add this code
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
add clock panel here
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
brightness panel here
</LinearLayout>
</com.android.san.PanelSwitcher>
+Now decompile Your app
+Thats it.
+Now you can slide clock panel left to use brightness panel.
NOTE
Remember to place your panels between two layouts as in above code.
Use this guide to mod other apps also.
CREDITS
DEV of calculater app
Me
This is what iam talking about on sliding...
This is my theme
{
"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"
}
Let me see if I got this right with this mod for example on statusbar_expanded on your screenshot we can just swipe to get a second view?
Sent from my H100 using xda app-developers app
thirdzcee said:
Let me see if I got this right with this mod for example on statusbar_expanded on your screenshot we can just swipe to get a second view?
Sent from my H100 using xda app-developers app
Click to expand...
Click to collapse
Yes
Sent from my GT-S5360 using Tapatalk 2
working like a charm bro.,.. thanks for this :good::good::good:
Thats nice .
Dont just say thanks press it too.
Sent from my GT-S5360 using Tapatalk 2
Wow greats thanks Dev
Post some ss guys
Sent from my GT-S5360 using Tapatalk 2
san122 said:
Thats nice .
Dont just say thanks press it too.
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
already did.:good::good::good:
thirdzcee said:
already did.:good::good::good:
Click to expand...
Click to collapse
bro need help how to make it on quicksettings by just sliding..it will be great..
Edit: Can I make it like for example my first layout would be the standard status bar expanded with WIFI, BT, etc toggles then as I slide it to the left it would be the Quicksettings Panel?? Then Vice Versa from quicksettings back to standard status bar expanded??.I manage to have make it swipe but somehow Quicksettings (LIDROIDS) doesnt appear..its just black panel..
greedisgood99999 said:
bro need help how to make it on quicksettings by just sliding..it will be great..
Edit: Can I make it like for example my first layout would be the standard status bar expanded with WIFI, BT, etc toggles then as I slide it to the left it would be the Quicksettings Panel?? Then Vice Versa from quicksettings back to standard status bar expanded??.I manage to have make it swipe but somehow Quicksettings (LIDROIDS) doesnt appear..its just black panel..
Click to expand...
Click to collapse
Anything is possible with it
Check out mine
https://www.youtube.com/watch?v=rTrcnqYJAOw&feature=youtube_gdata_player
Send me your statusbarexpanded.xml and ill analyze it later to see whats missing
Sent from my GT-I9070 using xda app-developers app
deleted
---------- Post added at 09:16 AM ---------- Previous post was at 08:36 AM ----------
thirdzcee said:
Anything is possible with it
Check out mine
https://www.youtube.com/watch?v=rTrcnqYJAOw&feature=youtube_gdata_player
Send me your statusbarexpanded.xml and ill analyze it later to see whats missing
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
Sorry bro need to delete my last post it gives me FC..here is my unmodded systemui statusbar expanded..it has the Quicksettings by SpaceCaker i want to be slidable..if possible..thanks..
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/stat_power_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:gravity="center" android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/carrier_label_gemini" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height">
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier1" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<ImageView android:layout_gravity="center" android:id="@id/carrier_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/gemini_carrier_divider" />
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier2" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/stat_power_bg" android:layout_width="fill_parent" android:layout_height="103.0dip" android:layout_marginTop="48.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
</FrameLayout>
<LinearLayout android:orientation="horizontal" android:background="@drawable/stat_power_bg" android:layout_width="fill_parent" android:layout_height="35.0dip" android:layout_marginTop="151.0dip">
<include layout="@layout/adi_brightness" />
<TextView android:textSize="20.0dip" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/notification_title" android:paddingLeft="16.0dip" android:paddingRight="16.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_weight="1.0" />
</LinearLayout>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/scroll_view_margin_top" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
</com.spacecaker.SpaceLayOut>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:id="@id/closeImg" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
thirdzcee said:
Anything is possible with it
Check out mine
https://www.youtube.com/watch?v=rTrcnqYJAOw&feature=youtube_gdata_player
Send me your statusbarexpanded.xml and ill analyze it later to see whats missing
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
sir can you send me your statusbar expanded,i can compare with my file,i still not know how it work
greedisgood99999 said:
deleted
---------- Post added at 09:16 AM ---------- Previous post was at 08:36 AM ----------
Sorry bro need to delete my last post it gives me FC..here is my unmodded systemui statusbar expanded..it has the Quicksettings by SpaceCaker i want to be slidable..if possible..thanks..
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/stat_power_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:gravity="center" android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/carrier_label_gemini" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height">
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier1" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<ImageView android:layout_gravity="center" android:id="@id/carrier_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/gemini_carrier_divider" />
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier2" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/stat_power_bg" android:layout_width="fill_parent" android:layout_height="103.0dip" android:layout_marginTop="48.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
</FrameLayout>
<LinearLayout android:orientation="horizontal" android:background="@drawable/stat_power_bg" android:layout_width="fill_parent" android:layout_height="35.0dip" android:layout_marginTop="151.0dip">
<include layout="@layout/adi_brightness" />
<TextView android:textSize="20.0dip" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/notification_title" android:paddingLeft="16.0dip" android:paddingRight="16.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_weight="1.0" />
</LinearLayout>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/scroll_view_margin_top" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
</com.spacecaker.SpaceLayOut>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:id="@id/closeImg" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Click to expand...
Click to collapse
okay so first of all you need toreplace these lines
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
with
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
and this one
Code:
</com.spacecaker.SpaceLayOut>
with
Code:
</com.android.san.PanelSwitcher>
then move
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
above
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
so it would look like this
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
remove these
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
and enclose everything inside a frame layout so it would look like this
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<FrameLayout android:layout_height="fill_parent" android:layout_width="fill_parent">
all the other lines in between
</FrameLayout>
</com.android.san.PanelSwitcher>
at this point it should be simple now basing on the layout from the OP as a guide your layout should now look like with the line we removed earlier added back to the area of the 2nd view
(look at the red thats what changed here)
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
[COLOR="Red"] THE FRAMELAYOUT AND EVERYTHING IN BETWEEN[/COLOR]
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="[COLOR="Red"]fill_parent[/COLOR]" android:baselineAligned="false">
[COLOR="Red"] <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>[/COLOR]
</LinearLayout>
</com.android.san.PanelSwitcher>
thats it, and you should be able to get the view by swiping on the clock area since the smali doesnt allow us to swipe on a scrollview like the togges or the notification AND PLEASE DONT TOUCH ANYTHING OUTSID THE
com.android.san.PanelSwitcher LINES ... ALL THE EDITS ARE DONE INSIDE OR IN BETWEEN THESE LINES ONLY, THE REST WERE UNTOUCHED
PS i shortened the codes on purpose but explained the changes one by one so youll be able to do it yourself, i dont like spoon feeding :laugh:
---------- Post added at 06:41 PM ---------- Previous post was at 06:31 PM ----------
billy_cater said:
sir can you send me your statusbar expanded,i can compare with my file,i still not know how it work
Click to expand...
Click to collapse
follow on the guide i posted for greedisgood
the principle is still the same, all you have to do is analyze the layout of the xml, i cant send the file anymore because i have i no longer have my old phone, i have a different phone now and for me to get that SystemUI ill have to download my full rom
thirdzcee said:
okay so first of all you need toreplace these lines
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
with
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
and this one
Code:
</com.spacecaker.SpaceLayOut>
with
Code:
</com.android.san.PanelSwitcher>
then move
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
above
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
so it would look like this
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
remove these
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
and enclose everything inside a frame layout so it would look like this
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<FrameLayout android:layout_height="fill_parent" android:layout_width="fill_parent">
all the other lines in between
</FrameLayout>
</com.android.san.PanelSwitcher>
at this point it should be simple now basing on the layout from the OP as a guide your layout should now look like with the line we removed earlier added back to the area of the 2nd view
(look at the red thats what changed here)
Code:
<com.android.san.PanelSwitcher android:id="@id/panelswitch" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
[COLOR="Red"] THE FRAMELAYOUT AND EVERYTHING IN BETWEEN[/COLOR]
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="[COLOR="Red"]fill_parent[/COLOR]" android:baselineAligned="false">
[COLOR="Red"] <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>[/COLOR]
</LinearLayout>
</com.android.san.PanelSwitcher>
thats it, and you should be able to get the view by swiping on the clock area since the smali doesnt allow us to swipe on a scrollview like the togges or the notification AND PLEASE DONT TOUCH ANYTHING OUTSID THE
com.android.san.PanelSwitcher LINES ... ALL THE EDITS ARE DONE INSIDE OR IN BETWEEN THESE LINES ONLY, THE REST WERE UNTOUCHED
PS i shortened the codes on purpose but explained the changes one by one so youll be able to do it yourself, i dont like spoon feeding :laugh:
---------- Post added at 06:41 PM ---------- Previous post was at 06:31 PM ----------
follow on the guide i posted for greedisgood
the principle is still the same, all you have to do is analyze the layout of the xml, i cant send the file anymore because i have i no longer have my old phone, i have a different phone now and for me to get that SystemUI ill have to download my full rom
Click to expand...
Click to collapse
alright thanks to this..will try now..the how to on OP is too difficult to analyze for newbies like me..but so far i made it for sliding that's it..lol..
BTW, any solution to enable DUAL SWIPING on Spacecaker 4.2.2 Quicksettings bro??
EDIT: Bro its perfect..thanks to this..I just modify some of your codes you've given rearranged it and works perfectly..btw, is there a solution to this..once I slide to my next panel then closed status bar expanded then open it again it goes back to may second panel..how to make back to first panel again after closing status bar expanded??.is this keycode or what??.thanks..this is so awesome..i want to add volume slider as well after the second panel which will be the third panel..will experiment it..thanks to this..totally awesome..
CM9??
Will it work on cm9?
OJ said:
Will it work on cm9?
Click to expand...
Click to collapse
Yes
Sent from my GT-S5360 using Tapatalk 2
How to edit the colour of the right-upper clock? Which xml files I need to edit? from System-UI or framework-res or others?
SystemUI.apk
res/layout/status_bar.xml
edit hexadecimal value for the clock colour
marcussmith2626 said:
SystemUI.apk
res/layout/status_bar.xml
edit hexadecimal value for the clock colour
Click to expand...
Click to collapse
i opened it I cant manage to find it. what does the bold text mean?
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
RoyaLKurTx3 said:
i opened it I cant manage to find it
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Click to expand...
Click to collapse
Try adding
android:textColor="#ffffffff"
Change the #hex code to colour you want #ffffffff equals white
you can also easily change it if your rom has EDT Tweaks
marcussmith2626 said:
Try adding
android:textColor="#ffffffff"
Change the #hex code to colour you want #ffffffff equals white
Click to expand...
Click to collapse
thx, i will try that on my phone and see will make it ics colour #FF33B5E5
RoyaLKurTx3 said:
thx, i will try that on my phone and see will make it ics colour #FF33B5E5
Click to expand...
Click to collapse
If you're using a stock based custom rom some have EDT Tweaks somewhere in it's settings you can also set clock colour that way if it's set up to
marcussmith2626 said:
Try adding
android:textColor="#ffffffff"
Change the #hex code to colour you want #ffffffff equals white
you can also easily change it if your rom has EDT Tweaks
Click to expand...
Click to collapse
marcussmith2626 said:
If you're using a stock based custom rom some have EDT Tweaks somewhere in it's settings you can also set clock colour that way if it's set up to
Click to expand...
Click to collapse
I'm using this: http://forum.xda-developers.com/showthread.php?t=2118569
I did: <com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
and it didnt work :/
RoyaLKurTx3 said:
I did: <com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
and it didnt work :/
Click to expand...
Click to collapse
You will need to use edt tweaks then - search your rom settings
normally in settings you will have rom name settings & it will be in there
(the apk edt.apk or similar will be in system/app)
if not search xda to learn how to put edt tweaks into your rom
marcussmith2626 said:
You will need to use edt tweaks then - search your rom settings
normally in settings you will have rom name settings & it will be in there
(the apk edt.apk or similar will be in system/app)
if not search xda to learn how to put edt tweaks into your rom
Click to expand...
Click to collapse
I found this: http://forum.xda-developers.com/showthread.php?t=2372440&highlight=edt+tweaks
but it looks bad. Cant change the colour. Any help? I also need to remove the "1" of the SIM 1 on the GT-S6102.
I also found this: http://forum.xda-developers.com/showthread.php?t=1123830
but is it for gt-s6102 too?
RoyaLKurTx3 said:
I also found this: http://forum.xda-developers.com/showthread.php?t=1123830
but is it for gt-s6102 too?
Click to expand...
Click to collapse
You can't use that SystemUI.apk - you need to follow the porting guide and incorporate the smali code into your SystemUI.apk to use with edt tweaks
evo-x4 for galaxy y GT-S5360 uses that mod
marcussmith2626 said:
You can't use that SystemUI.apk - you need to follow the porting guide and incorporate the smali code into your SystemUI.apk to use with edt tweaks
evo-x4 for galaxy y GT-S5360 uses that mod
Click to expand...
Click to collapse
I added the correct (I placed it correctly) smali code, pushed it to system/app and did the permissions. I rebooted and it started fc. you know why?
RoyaLKurTx3 said:
I added the correct (I placed it correctly) smali code, pushed it to system/app and did the permissions. I rebooted and it started fc. you know why?
Click to expand...
Click to collapse
Either smali not compatible or mistakes made
use the smali files from evo-x4 SystemUI.apk (for personal use)
also if you copied the status_bar.xml from that threads SystemUI.apk to yours it will force close as it's not for our device
contact the developer of evo-x4 - he will be able to help you with it if he has time
marcussmith2626 said:
Either smali not compatible or mistakes made
use the smali files from evo-x4 SystemUI.apk (for personal use)
also if you copied the status_bar.xml from that threads SystemUI.apk to yours it will force close as it's not for our device
contact the developer of evo-x4 - he will be able to help you with it if he has time
Click to expand...
Click to collapse
ah ok. I will copy status_bar.xml from evo-x4 (although I have GT-S6102) and see what happens, if it force closes, than I will do edt tweaks.
no luck. didnt let me recompile. this edt tweaks is hard ._.
Here:
status_bar.xml of evo-x4:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#00000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.b16h22.statusbar.StatusBar android:id="@id/status_bar" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.BatteryText android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#00000000" android:gravity="left|center" android:id="@id/date" android:background="#ff000000" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
<com.android.systemui.statusbar.BatteryBar android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.StatusBarView>
my current staus-bar.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:background="#ff000000" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.StatusBarView>
You can't just copy and paste status_bar.xml - I meant for you to compare so you know what changes you need to make for your own or to find a guide
you would of got compile errors because the @iD values are different & would need changing in the values.xml
marcussmith2626 said:
You can't just copy and paste status_bar.xml - I meant for you to compare so you know what changes you need to make for your own or to find a guide
you would of got compile errors because the @iD values are different & would need changing in the values.xml
Click to expand...
Click to collapse
I don't want to sound selfish or anything, but can you give me the code for the system_bar.xml? I cant manage it and I gave you both the codes above. Please? :fingers-crossed:
RoyaLKurTx3 said:
I don't want to sound selfish or anything, but can you give me the code for the system_bar.xml? I cant manage it and I gave you both the codes above. Please? :fingers-crossed:
Click to expand...
Click to collapse
Here is what I would do
Take BatteryText*.smali & Clock*.smali from evo-x4 SystemUI.apk and paste into yours (all files * represent different numbers and parts)
Copy the lines starting
<com.android.systemui.statusbar.BatteryText
From evo-x4 status_bar.xml copy & paste into yours above the line starting
com.android.systemui.statusbar.Clock
Replace your lines starting
Com.android.systemui.statusbar.clock
with the one from evo-x4 (it maybe the same though can't see it all on phone)
So the line for battery is above clock
Compile and push to system or flash with flashable zip
install the edt tweaks apk
See if you can use it to change colour
after compile and succesfuly
then fllas to my device can't boot
this device tree my device
[
{
"remote": "yazidkucrit",
"repository": "android_device_samsung_msm7x27a-common",
"target_path": "device/samsung/msm7x27a-common",
"revision": "android-4.4"
},
{
"remote": "yazidkucrit",
"repository": "android_device_samsung_trebon",
"target_path": "device/samsung/trebon",
"revision": "android-4.4"
},
{
"remote": "TheWhisp",
"repository": "proprietary_vendor_samsung_msm7x27a",
"target_path": "vendor/samsung",
"revision": "cm-10.2"
},
{
"remote": "yazidkucrit",
"repository": "kernel_KeongBalap",
"target_path": "kernel/samsung/msm7x27a-common",
"revision": "master"
}
]
yazidkucrit said:
after compile and succesfuly
then fllas to my device can't boot
this device tree my device
[
{
"remote": "yazidkucrit",
"repository": "android_device_samsung_msm7x27a-common",
"target_path": "device/samsung/msm7x27a-common",
"revision": "android-4.4"
},
{
"remote": "yazidkucrit",
"repository": "android_device_samsung_trebon",
"target_path": "device/samsung/trebon",
"revision": "android-4.4"
},
{
"remote": "TheWhisp",
"repository": "proprietary_vendor_samsung_msm7x27a",
"target_path": "vendor/samsung",
"revision": "cm-10.2"
},
{
"remote": "yazidkucrit",
"repository": "kernel_KeongBalap",
"target_path": "kernel/samsung/msm7x27a-common",
"revision": "master"
}
]
Click to expand...
Click to collapse
Device can't boot is a little less of information...
Do you see the Omni-Logo ? If not than it's quite sure that even the kernel does not boot up. If yes than do a logcat during boot up.
Greetz
lagloose said:
Device can't boot is a little less of information...
Do you see the Omni-Logo ? If not than it's quite sure that even the kernel does not boot up. If yes than do a logcat during boot up.
Greetz
Click to expand...
Click to collapse
no omni the logo, but if the menu button and back in the press there are vibrations which indicates that it is alive
hi, can you help me with something?
yjosipy is trying to build cm11 as well but we have a problem,
when sync repo, it giver error at your manifest
can you plz tell us what is wrong?
<!-- Local projects -->
<project path="external/webkit" name="legaCyMod/android_external_webkit" revision="cm-11.0" />
<project path="hardware/atheros/wlan" name="TheWhisp/android_hardware_atheros_wlan" revision="cm-11.0" />
<project path="hardware/qcom/display-legacy" name="TheWhisp/android_hardware_qcom_display-legacy" revision="jellybean-mr2" />
<project path="hardware/qcom/media-legacy" name="Dazzozo/android_hardware_qcom_media-legacy" revision="jellybean-mr2" />
<project path="device/samsung/msm7x27a-common" name="yazidkucrit/android_device_samsung_msm7x27a-common" revision="cm-11.0" />
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_s7500" revision="cm-11" />
<project path="kernel/samsung/msm7x27a-common" name="yazidkucrit/kernel_KeongBalap" revision="master" />
<project path="vendor/samsung" name="yazidkucrit/proprietary_vendor_samsung_msm7x27a" revision="cm-10.2" />
The revision on your manifest and your branch on github for Samsung common are different, update manifest for this to android-4.4 and you will be fine. See you are using LegaCyMod for the WebKit. You know there are some patches that you need to apply before you build, you can find them on Legacymod github
Sent from my Blade III using Tapatalk
ShadowsDie said:
hi, can you help me with something?
yjosipy is trying to build cm11 as well but we have a problem,
when sync repo, it giver error at your manifest
can you plz tell us what is wrong?
<!-- Local projects -->
<project path="external/webkit" name="legaCyMod/android_external_webkit" revision="cm-11.0" />
<project path="hardware/atheros/wlan" name="TheWhisp/android_hardware_atheros_wlan" revision="cm-11.0" />
<project path="hardware/qcom/display-legacy" name="TheWhisp/android_hardware_qcom_display-legacy" revision="jellybean-mr2" />
<project path="hardware/qcom/media-legacy" name="Dazzozo/android_hardware_qcom_media-legacy" revision="jellybean-mr2" />
<project path="device/samsung/msm7x27a-common" name="yazidkucrit/android_device_samsung_msm7x27a-common" revision="cm-11.0" />
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_s7500" revision="cm-11" />
<project path="kernel/samsung/msm7x27a-common" name="yazidkucrit/kernel_KeongBalap" revision="master" />
<project path="vendor/samsung" name="yazidkucrit/proprietary_vendor_samsung_msm7x27a" revision="cm-10.2" />
Click to expand...
Click to collapse
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_s7500" revision="cm-11" /> where did u find this repo ? ...it looks like it doesn't exist..
B]<project path="device/samsung/msm7x27a-common" name="yazidkucrit/android_device_samsung_msm7x27a-common" revision="cm-11.0" />
branch error : or android-4.4 or master
ilpolpi65 said:
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_s7500" revision="cm-11" /> where did u find this repo ? ...it looks like it doesn't exist...
Click to expand...
Click to collapse
yes sry i saw that right after i posted this
so i guess i delete that and its done?
---------- Post added at 11:45 PM ---------- Previous post was at 11:31 PM ----------
robt77 said:
The revision on your manifest and your branch on github for Samsung common are different, update manifest for this to android-4.4 and you will be fine. See you are using LegaCyMod for the WebKit. You know there are some patches that you need to apply before you build, you can find them on Legacymod github
Sent from my Blade III using Tapatalk
Click to expand...
Click to collapse
i dont know what patches are you talking about, can you clarify me that?
or is the legacymod only for blade III?
ShadowsDie said:
yes sry i saw that right after i posted this
so i guess i delete that and its done?
---------- Post added at 11:45 PM ---------- Previous post was at 11:31 PM ----------
i dont know what patches are you talking about, can you clarify me that?
or is the legacymod only for blade III?
Click to expand...
Click to collapse
I only mentioned it as saw the legacymod/WebKit repo and thought I would mention it. Think our phones have similar chip sets so it might work. The patches are under local manifest on legacymod github. There are one under framework/base and two under framework/webview you may need to make an amendment to your boardconfig to allow use of that WebKit. Sorry still new to this Android development.
Sent from my Blade III using Tapatalk
fatal: remote error: Git repository not found
Hi,
I'm trying to build Omnirom for my gt-s7500 and I get "fatal: remote error: Git repository not found" errors when doing repo sync for all the "extra" repositories beside the Omnirom tree.
I use the sources from http://forum.xda-developers.com/showthread.php?t=2640855
Here's what I have in my local manifest :
Code:
<!-- Local projects -->
<manifest>
<project path="device/samsung/msm7x27a-common" name="yazidkucrit/android_device_samsung_msm7x27a-common" revision="android-4.4" />
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_trebon" revision="android-4.4" />
<project path="kernel/samsung/msm7x27a-common" name="yazidkucrit/kernel_bekicot" revision="master" />
<project path="vendor/samsung" name="TheWhisp/proprietary_vendor_samsung_msm7x27a" revision="cm-10.2" />
</manifest>
Any idea ? I'm a newbie in this area and I'm trying to learn.
Thanks in advance,
Jérôme
jdegreef said:
I'm trying to build Omnirom for my gt-s7500 and I get "fatal: remote error: Git repository not found" errors..
Click to expand...
Click to collapse
Look at what it says for which repositories it cannot find, then you try to manually find them on github.com. Check branches/revisions as well.
jdegreef said:
Here's what I have in my local manifest :
Click to expand...
Click to collapse
You need to specify where these yazidkucrit and TheWhisp repos are, so your local manifest should look like this:
Code:
<!-- Local projects -->
<manifest>
<remote fetch="git://github.com/yazidkucrit" name="yazidkucrit" />
<remote fetch="git://github.com/TheWhisp" name="TheWhisp" />
<project path="device/samsung/msm7x27a-common" name="yazidkucrit/android_device_samsung_msm7x27a-common" remote="github" revision="android-4.4" />
<project path="device/samsung/trebon" name="yazidkucrit/android_device_samsung_trebon" remote="github" revision="android-4.4" />
<project path="kernel/samsung/msm7x27a-common" name="yazidkucrit/kernel_bekicot" remote="github" revision="master" />
<project path="vendor/samsung" name="TheWhisp/proprietary_vendor_samsung_msm7x27a" remote="github" revision="cm-10.2" />
</manifest>
Also, I very much doubt that your kernel is called msm7x27a-common.
Thank You both of you.
It turned out that my local_manifest was corrupt probably because of a copy/paste from the web. I recreate it from scratch and everything synced without error.
But now when trying breakfast i get
Code:
[email protected]:~/android/omni$ breakfast
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
Which would you like? [aosp_arm-eng]
you device can't be found in device sources..
Traceback (most recent call last):
File "build/tools/roomservice.py", line 297, in <module>
fetch_dependencies(device)
File "build/tools/roomservice.py", line 250, in fetch_dependencies
raise Exception("ERROR: could not find your device "
Exception: ERROR: could not find your device folder location, bailing out
I assume my knowledge is very limited and up until now I've only been able to build CM11 for officially supported devices.
{
"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"
}
What do we need:
- apktool
- Notepad++
- the mind
Decompile MiuiSystemUI.apk
go to res/layout/status_bar_simple.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.SimpleStatusBar android:gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.phone.BatteryIndicator android:layout_gravity="top" android:id="@id/battery_indicator" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/battery_indicator" android:scaleType="fitXY" />
<RelativeLayout android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="3.0dip" android:paddingEnd="3.0dip">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="3.0dip" android:paddingEnd="3.0dip" />
<LinearLayout android:gravity="start|center" android:id="@id/notification_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toEndOf="@id/clock">
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/notification_more_icon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
</LinearLayout>
<com.android.systemui.statusbar.phone.StatusBarIcons android:gravity="end|center" android:id="@id/statusbar_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentEnd="true">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.NetworkSpeedView android:textAppearance="@style/TextAppearance.StatusBar.Carrier" android:gravity="end|center" android:id="@id/network_speed_view" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_marginEnd="3.0dip" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center_vertical" android:id="@id/signal_cluster_container" android:layout_width="0.0dip" android:layout_height="fill_parent" android:baselineAligned="false" android:layout_weight="1.0">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" layout="@layout/signal_cluster_view" />
<include android:id="@id/signal_cluster2" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" layout="@layout/signal_cluster_view" />
</LinearLayout>
<ImageView android:id="@id/battery_charging_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.phone.BatteryStatusIconView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="center" android:id="@id/battery_num" android:paddingBottom="@dimen/statusbar_battery_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="1.0dip" android:layout_marginEnd="3.0dip" />
</com.android.systemui.statusbar.phone.StatusBarIcons>
</RelativeLayout>
</com.android.systemui.statusbar.phone.SimpleStatusBar>
change to :
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.SimpleStatusBar android:gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.phone.BatteryIndicator android:layout_gravity="top" android:id="@id/battery_indicator" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/battery_indicator" android:scaleType="fitXY" />
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="3.0dip" android:paddingRight="3.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:gravity="left" android:paddingRight="3.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<LinearLayout android:gravity="center_vertical" android:id="@id/signal_cluster_container" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<include android:id="@id/signal_cluster2" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<com.android.systemui.statusbar.NetworkSpeedView android:textAppearance="@style/TextAppearance.StatusBar.Carrier" android:gravity="center|left" android:id="@id/network_speed_view" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="3.0dip" android:layout_marginRight="3.0dip" android:singleLine="true" />
<LinearLayout android:gravity="center|right" android:id="@id/notification_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/notification_more_icon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="3.0dip" android:paddingEnd="3.0dip" />
</LinearLayout>
<LinearLayout android:gravity="right" android:layout_gravity="right" android:paddingLeft="3.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<com.android.systemui.statusbar.phone.StatusBarIcons android:gravity="end|center" android:id="@id/statusbar_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentEnd="true">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<ImageView android:id="@id/battery_charging_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="center" android:id="@id/battery_num" android:paddingBottom="@dimen/statusbar_battery_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="1.0dip" android:layout_marginEnd="3.0dip" />
<com.android.systemui.statusbar.phone.BatteryStatusIconView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.phone.StatusBarIcons>
</LinearLayout>
</LinearLayout>
</com.android.systemui.statusbar.phone.SimpleStatusBar>
recompile MiuiSystemUi
Done
thanks man but just question the notification icon is on left or right?
left
Wew, Noice!
Lemme add this to index
how to positioning wifi icon on the right signal icon?
like this screenshot
Hi, i'm also interested in this question
how to positioning wifi icon on the right signal icon?
Click to expand...
Click to collapse
, i suppose some lines of code must change places but can you tell which? And how to hide wifi speed in this code?
What if I want only centered clock and everything else normal (wifi on right side). Can you please highlight the exact section that has to do with the clock. Is it even possible to only center the clock?
Hello @S3V3N its possible to get a flashable zip for center clock? I can't live without centre clock lol.
sachin n said:
Hello @S3V3N its possible to get a flashable zip for center clock? I can't live without centre clock lol.
Click to expand...
Click to collapse
+1 would be very nice
Msimatch
There is a app on playstore for that.
https://play.google.com/store/apps/details?id=com.zapperbyte.miuistatusbarpro
i need root?
Yes
Wysłane z mojego LG-H870 przy użyciu Tapatalka
Bro is there any flashable zip file for this
I am Unable To do thaT
Is there any Flashable zip file
sachin n said:
Hello @S3V3N its possible to get a flashable zip for center clock? I can't live without centre clock lol.
Click to expand...
Click to collapse
https://play.google.com/store/apps/details?id=com.zapperbyte.miuistatusbarpro enjoy
Wysłane z mojego LG-H870 przy użyciu Tapatalka
My Device is Redmi 2 prime . Support or not?