-
Notifications
You must be signed in to change notification settings - Fork 788
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/main/java/swati4star/createpdf/fragment/ChangeLanguageFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package swati4star.createpdf.fragment; | ||
|
||
import android.app.backup.BackupManager; | ||
import android.content.Intent; | ||
import android.content.res.Configuration; | ||
import android.os.Bundle; | ||
import android.provider.Settings; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.SearchView; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import com.dd.morphingbutton.MorphingButton; | ||
|
||
import java.lang.reflect.Method; | ||
import java.util.Locale; | ||
|
||
import swati4star.createpdf.R; | ||
|
||
public class ChangeLanguageFragment extends Fragment implements View.OnClickListener { | ||
private MorphingButton button1, button2; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
|
||
View view = inflater.inflate(R.layout.change_language, container, false); | ||
button1 = view.findViewById(R.id.button1); | ||
button2 = view.findViewById(R.id.button2); | ||
button1.setOnClickListener(this); | ||
button2.setOnClickListener(this); | ||
return view; | ||
} | ||
|
||
@Override | ||
public void onClick(View view) { | ||
switch (view.getId()) { | ||
case R.id.button1: | ||
case R.id.button2: | ||
Intent intent2 = new Intent(Settings.ACTION_LOCALE_SETTINGS); | ||
startActivity(intent2); | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24" | ||
> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M3,13h2v-2L3,11v2zM3,17h2v-2L3,15v2zM3,9h2L5,7L3,7v2zM7,13h14v-2L7,11v2zM7,17h14v-2L7,15v2zM7,7v2h14L21,7L7,7z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
|
||
<com.dd.morphingbutton.MorphingButton | ||
android:id="@+id/button1" | ||
style="@style/MorphingButton" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="24dp" | ||
android:maxWidth="30dp" | ||
android:padding="3dip" | ||
android:text="English" /> | ||
|
||
<com.dd.morphingbutton.MorphingButton | ||
android:id="@+id/button2" | ||
style="@style/MorphingButton" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="24dp" | ||
android:layout_marginRight="24dp" | ||
android:maxWidth="30dp" | ||
android:padding="3dip" | ||
android:text="汉语" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters